[Issue 14061] New: Refused array concat at compile-time
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Tue Jan 27 06:55:54 PST 2015
https://issues.dlang.org/show_bug.cgi?id=14061
Issue ID: 14061
Summary: Refused array concat at compile-time
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: regression
Priority: P1
Component: DMD
Assignee: nobody at puremagic.com
Reporter: bearophile_hugs at eml.cc
int foo(int[] a) {
foreach (immutable x; a)
auto b = a ~ x;
return 0;
}
void main() {
enum r = foo([1]);
}
dmd 2.067alpha gives:
test.d(3): Error: a ~ x cannot be interpreted at compile time
test.d(7): called from here: foo([1])
--
More information about the Digitalmars-d-bugs
mailing list