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