Bug 8629 – UFCS resolution prints fake error

Status
RESOLVED
Resolution
FIXED
Severity
trivial
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-09-08T00:08:00Z
Last change time
2012-11-14T21:27:33Z
Keywords
diagnostic, pull
Assigned to
nobody
Creator
k.hara.pg

Comments

Comment #0 by k.hara.pg — 2012-09-08T00:08:15Z
Following code compilation fails with -property switch. ---- struct S {} auto gunc(S s, int n) { return 13; } @property grop(S s, int n) { return 14; } void main() { S s; assert((s.gunc = 1) == 13); // line 9 assert((s.grop = 1) == 14); // line 10 } output: ---- test.d(9): Error: not a property s.gunc test.d(10): Error: function test.grop (S s, int n) is not callable using argument types (S) test.d(10): Error: expected 2 function arguments, not 1 ---- But if you comment out line 9, you can succeed to compile. Then, the line 10 error for the code is *fake*.
Comment #1 by k.hara.pg — 2012-09-08T00:14:02Z
Comment #2 by github-bugzilla — 2012-09-10T04:30:28Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/cc4598aa7996bb31982cd90920c4ec37d1711b44 fix Issue 8629 - UFCS resolution prints fake error https://github.com/D-Programming-Language/dmd/commit/caf289137881ec290166afa72bc787bfbd6bd970 Merge pull request #1106 from 9rnsr/fix8629 Issue 8629 - UFCS resolution prints fake error