[Issue 4064] New: [CTFE] array.reverse doesn't work
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Apr 5 05:32:10 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4064
Summary: [CTFE] array.reverse doesn't work
Product: D
Version: future
Platform: x86
OS/Version: Windows
Status: NEW
Keywords: rejects-valid
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2010-04-05 05:32:09 PDT ---
bool foo(int[] arr) {
arr.reverse;
return arr == [2, 1];
}
enum bool r = foo([1, 2]);
void main() {}
dmd 2.042 gives:
test.d(2): Error: cannot evaluate _adReverse(arr,4u) at compile time
test.d(5): Error: cannot evaluate foo([1,2]) at compile time
test.d(5): Error: cannot evaluate foo([1,2]) at compile time
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list