June 03, 2011 [Issue 6100] New: [CTFE] regression: struct return values wrong if used in array initializer | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6100 Summary: [CTFE] regression: struct return values wrong if used in array initializer Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: wrong-code Severity: regression Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: r.sagitario@gmx.de --- Comment #0 from Rainer Schuetze <r.sagitario@gmx.de> 2011-06-03 10:34:04 PDT --- struct S { int a; } S initS(int x) { version(works) return S(x); else { S s = S(x); return s; } } static const S[2] s2 = [ initS(1), initS(2) ]; static assert(s2[0].a == 1); fails with the latest version from github with test.d(19): Error: static assert (2 == 1) is false dmd 2.053 compiles without error. enabling version "works" also works. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
June 11, 2011 [Issue 6100] [CTFE] regression: struct return values wrong if used in array initializer | ||||
---|---|---|---|---|
| ||||
Posted in reply to Rainer Schuetze | http://d.puremagic.com/issues/show_bug.cgi?id=6100 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> 2011-06-11 06:44:55 PDT --- https://github.com/D-Programming-Language/dmd/commit/5aac13c31c86fb11465e5a3b52775e850d8b193d -- 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