Bug 11819 – Implement better diagnostics for unrecognized traits

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2013-12-25T17:42:00Z
Last change time
2014-04-28T16:44:06Z
Keywords
diagnostic
Assigned to
andrej.mitrovich
Creator
bearophile_hugs

Comments

Comment #0 by bearophile_hugs — 2013-12-25T17:42:00Z
Wrong code: class Foo {} void main() { auto s = __traits(ClassInstanceSize, Foo); } DMD 2.065alpha prints (note the false at the second line): temp.d(3): Error: unrecognized trait ClassInstanceSize In a similar situation I suggest to print instead: temp.d(3): Error: uknown trait identifier ClassInstanceSize, did you mean classInstanceSize?
Comment #1 by andrej.mitrovich — 2014-04-28T09:23:27Z
Comment #2 by github-bugzilla — 2014-04-28T16:44:06Z
Commits pushed to master at https://github.com/D-Programming-Language/dmd https://github.com/D-Programming-Language/dmd/commit/fba388493111cfae7db818f6b4614cdf5172a9ac Fix Issue 11819 - Implement better diagnostics for unrecognized traits. https://github.com/D-Programming-Language/dmd/commit/36d64b3242dbd3d06daed9eb63bdd21e49e5556c Merge pull request #3507 from AndrejMitrovic/Fix11819 Issue 11819 - Implement better diagnostics for unrecognized traits.