Bug 9946 – A UFCS disallowed in dynamic array allocation
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-04-16T15:55:00Z
Last change time
2013-05-04T00:06:47Z
Keywords
pull, rejects-valid
Assigned to
nobody
Creator
bearophile_hugs
Comments
Comment #0 by bearophile_hugs — 2013-04-16T15:55:57Z
size_t count(alias x)(int[] haystack) {
return 0;
}
void main() {
int[] data;
auto n1 = count!5(data); // OK
auto n2 = data.count!5; // OK
auto a1 = new int[count!5(data)]; // OK
auto a2 = new int[data.count!5]; // Error
}
DMD 2.063alpha gives:
test.d(9): Error: no property 'count!(5)' for type 'int[]'