Bug 7811 – D2 beta outputs "not a property" error instead of real error on UFCS array template property

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-04-02T09:21:00Z
Last change time
2012-04-09T13:51:05Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
schveiguy

Comments

Comment #0 by schveiguy — 2012-04-02T09:21:28Z
Beta version for 2.059 release. This code has an error in it: void main() { int[] x; assert(x.l == null); } @property immutable(T*) l(T)(T[] t) { return t.ptr; } However, the error reported by dmd beta is: Error: not a property x.l If I remove @property: void main() { int[] x; assert(x.l() == null); } immutable(T*) l(T)(T[] t) { return t.ptr; } I get the true error: Error: cannot implicitly convert expression (cast(int*)t) of type int* to immutable(int*) Error: template instance l!(int) error instantiating
Comment #1 by k.hara.pg — 2012-04-09T06:40:42Z
Comment #2 by github-bugzilla — 2012-04-09T08:40:32Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/62fbecbc8d50c5a2508065e52b8da13d4c31e9b8 fix Issue 7811 - "not a property" error instead of real error on UFCS array template property https://github.com/D-Programming-Language/dmd/commit/d06e17dee97d9ce155a78e90373d3119f1679798 Merge pull request #870 from 9rnsr/fix7811 Issue 7811 - "not a property" error instead of real error on UFCS array template property