Bug 9574 – Diagnostic for old use of 'alias this = that' should be informative

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-02-22T13:06:00Z
Last change time
2014-02-07T04:10:58Z
Keywords
diagnostic
Assigned to
nobody
Creator
andrej.mitrovich

Comments

Comment #0 by andrej.mitrovich — 2013-02-22T13:06:58Z
module test; struct Foo { int x; alias this = x; } 2.062: $ dmd test.d > test.d(6): Error: no identifier for declarator this > test.d(6): Error: alias cannot have initializer This should be an informative message. At first it should state only 'alias x this;' is supported. When we get the new 'alias this : that' syntax we'll update the diagnostic to reflect that.
Comment #1 by andrej.mitrovich — 2013-02-22T13:29:27Z
Comment #2 by github-bugzilla — 2013-03-07T13:51:48Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/9b3ecfb6a0286b2a2c856d3b2fdec01a9491d74f Fixes Issue 9574 - Better diagnostic on old 'alias this = that' syntax. https://github.com/D-Programming-Language/dmd/commit/1e9511b94cc0cfacc7058fe5cad02a597e8dae2e Merge pull request #1685 from AndrejMitrovic/Fix9574 Issue 9574 - Better diagnostic on old 'alias this = that' syntax.