March 26, 2008 [Issue 1946] New: Compiler crashes on attempt to implicit cast const typedef to non-const. | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=1946 Summary: Compiler crashes on attempt to implicit cast const typedef to non-const. Product: D Version: 2.012 Platform: PC OS/Version: Windows Status: NEW Severity: critical Priority: P2 Component: DMD AssignedTo: bugzilla@digitalmars.com ReportedBy: sardonicpresence@gmail.com If an attempt is made to implicitly cast a const instance of a typedef of a class to a non-const instance, DMD 2.012 crashes. The following code causes the compiler to crash: class Foo {} typedef Foo Test; void f(Test test) {} void main() { const Test test; f(test); } If "typedef" is replaced with "alias" this does not occur. If "f(Test test)" is declared as "f(in Test test)" this does not occur. If Test is typedef'd to a value-type this does not occur (including structs). -- |
May 14, 2009 [Issue 1946] Compiler crashes on attempt to implicit cast const typedef to non-const. | ||||
---|---|---|---|---|
| ||||
Posted in reply to d-bugmail | http://d.puremagic.com/issues/show_bug.cgi?id=1946 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug@yahoo.com.au Resolution| |FIXED --- Comment #1 from Don <clugdbug@yahoo.com.au> 2009-05-14 06:59:05 PDT --- Fixed DMD2.030 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation