[Issue 11819] New: Better error message for unrecognized trait error
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed Dec 25 17:42:04 PST 2013
    
    
  
https://d.puremagic.com/issues/show_bug.cgi?id=11819
           Summary: Better error message for unrecognized trait error
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc
--- Comment #0 from bearophile_hugs at eml.cc 2013-12-25 17:42:00 PST ---
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?
-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
    
    
More information about the Digitalmars-d-bugs
mailing list