[Issue 5004] New: 'aka' usage in error messages

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Oct 6 12:20:40 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=5004

           Summary: 'aka' usage in error messages
           Product: D
           Version: D1 & 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 2010-10-06 12:20:15 PDT ---
The Clang front-end of LLVM tries harder to give good error messages:
http://clang.llvm.org/diagnostics.html

One simple but nice feature of its error messages is the usage of "aka", this
is an example:

t.c:13:9: error: member reference base type 'pid_t' (aka 'int') is not a
structure or union


This is a wrong D2 program: 


void main() {
    alias int Foo;
    Foo f;
    f = f.x;
}


DMD 2.049 prints:
test.d(4): Error: no property 'x' for type 'int'

But a more useful error message can be:
test.d(4): Error: no property 'x' for type 'Foo' (aka 'int')

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list