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[]'
Comment #1 by k.hara.pg — 2013-04-25T02:47:35Z
Comment #2 by github-bugzilla — 2013-05-02T09:36:12Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/bb5c37dda5b7832987b69e1f99839ec24d78fac0 fix Issue 9946 - A UFCS disallowed in dynamic array allocation `TypeQualified::idents` may have both `Identifier` and `TemplateInstance` objects. It should be treated correctly, as like as `Dsymbol::searchX` and `TypeQualified::resolveHelper`. https://github.com/D-Programming-Language/dmd/commit/2c5df8da30efdeb37d83d84bb78cee60815f94b2 Merge pull request #1934 from 9rnsr/fix9946 Issue 9946 - A UFCS disallowed in dynamic array allocation
Comment #3 by yebblies — 2013-05-02T11:51:16Z
Off the top of my head I'm unsure if this is applicable to D1.
Comment #4 by verylonglogin.reg — 2013-05-03T11:08:15Z
This probably was a part of Issue 9883 (second case from description).