Bug 18892 – Wrong type in error message for static members and alias this

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2018-05-21T17:00:28Z
Last change time
2018-05-28T14:10:30Z
Keywords
pull
Assigned to
No Owner
Creator
Simen Kjaeraas

Comments

Comment #0 by simen.kjaras — 2018-05-21T17:00:28Z
struct MT { int _payload; alias _payload this; } unittest { MT a; a.foo = 3; // Error: no property foo for type MT MT.foo = 3; // Error: no property foo for type int } I'd expect both error messages to refer to MT, not int.
Comment #1 by razvan.nitu1305 — 2018-05-23T12:41:07Z
Comment #2 by slavo5150 — 2018-05-28T12:48:41Z
Comment #3 by github-bugzilla — 2018-05-28T14:10:29Z
Commits pushed to master at https://github.com/dlang/dmd https://github.com/dlang/dmd/commit/6171f9e6980347b8678926034fb5757e513f0206 Fix Issue 18892 - Wrong type in error message for static members and alias this https://github.com/dlang/dmd/commit/35f614c7d3e1ab72879a5c4d40eb64584095d6f4 Merge pull request #8303 from JinShil/fix_18892 Fix Issue 18892 - Wrong type in error message for static members and alias this merged-on-behalf-of: Razvan Nitu <[email protected]>