Bug 14061 – Refused array concat at compile-time

Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-01-27T14:55:00Z
Last change time
2015-01-30T22:24:55Z
Keywords
CTFE, pull
Assigned to
nobody
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2015-01-27T14:55:54Z
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])
Comment #1 by k.hara.pg — 2015-01-29T15:01:24Z
Comment #2 by github-bugzilla — 2015-01-30T22:24:55Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/4bedd6bf67e365d7ed5226bd2b8b9667f07fd897 fix Issue 14061 - Refused array concat at compile-time https://github.com/D-Programming-Language/dmd/commit/4624de6ecddf553aaa1e6d008d38529dd259fb76 Merge pull request #4356 from 9rnsr/fix14061 [REG2.067a] Issue 14061 - Refused array concat at compile-time