September 12, 2011 [Issue 6653] New: [CTFE] internal error assigning struct | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=6653 Summary: [CTFE] internal error assigning struct Product: D Version: D2 Platform: Other OS/Version: Windows Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: bearophile_hugs@eml.cc --- Comment #0 from bearophile_hugs@eml.cc 2011-09-12 12:28:53 PDT --- Maybe this is an enhancement request. D2 code: import std.algorithm; int sqr(in int x) pure nothrow { return x * x; } enum r = map!sqr([3, 6]); void main() {} DMD 2.055 gives: ...\src\phobos\std\algorithm.d(459): Error: CTFE internal error assigning struct test.d(3): Error: cannot evaluate map([3,6]) at compile time ------------------ I don't know if an enum range is meaningful, my final purpose was to create a compile-time constant array: enum int[] r = array(map!sqr([3, 6])); -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 29, 2011 [Issue 6653] [CTFE] internal error assigning struct | ||||
---|---|---|---|---|
| ||||
Posted in reply to bearophile_hugs@eml.cc | http://d.puremagic.com/issues/show_bug.cgi?id=6653 Don <clugdbug@yahoo.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |clugdbug@yahoo.com.au Resolution| |DUPLICATE --- Comment #1 from Don <clugdbug@yahoo.com.au> 2011-09-29 01:21:18 PDT --- *** This issue has been marked as a duplicate of issue 6419 *** -- 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