|
Archives
D Programming
digitalmars.Ddigitalmars.D.bugs digitalmars.D.dtl digitalmars.D.ide digitalmars.D.dwt digitalmars.D.announce digitalmars.D.learn digitalmars.D.debugger D.gnu D C/C++ Programming
c++c++.announce c++.atl c++.beta c++.chat c++.command-line c++.dos c++.dos.16-bits c++.dos.32-bits c++.idde c++.mfc c++.rtl c++.stl c++.stl.hp c++.stl.port c++.stl.sgi c++.stlsoft c++.windows c++.windows.16-bits c++.windows.32-bits c++.wxwindows digitalmars.empire digitalmars.DMDScript electronics |
digitalmars.D.bugs - [Issue 3730] New: Struct's explicit constructor can't initialize global variables
http://d.puremagic.com/issues/show_bug.cgi?id=3730 Summary: Struct's explicit constructor can't initialize global variables Product: D Version: 2.039 Platform: x86 OS/Version: Windows Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: tomeksowi gmail.com --- Comment #0 from Tomasz Sowiński <tomeksowi gmail.com> 2010-01-20 12:20:09 PST --- Test case: struct S { int a; this(int a) { this.a = a; } static immutable S es = S(3); } Compiler output (message printed twice in original): test.d|9|Error: cannot evaluate ((S __ctmp516; test.d|9|Error: cannot evaluate ((S __ctmp516; Don't know if that should compile but surely the message could be more appealing. static this() may be used as a workaround for this bug. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jan 20 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3730 Don <clugdbug yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clugdbug yahoo.com.au --- Comment #1 from Don <clugdbug yahoo.com.au> 2010-01-20 12:55:03 PST --- This works for me in DMD2.039 Windows svn 342. (Are you sure you're not using 2.038?) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- Jan 20 2010
http://d.puremagic.com/issues/show_bug.cgi?id=3730 --- Comment #2 from Tomasz Sowiński <tomeksowi gmail.com> 2010-01-21 10:56:04 PST --- (In reply to comment #1)This works for me in DMD2.039 Windows svn 342. (Are you sure you're not using 2.038?) Jan 21 2010
|