[Issue 11144] New: Better diagnostic for typeid symbol

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Sep 29 23:12:21 PDT 2013


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

           Summary: Better diagnostic for typeid symbol
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: diagnostic
          Severity: minor
          Priority: P2
         Component: DMD
        AssignedTo: nobody at puremagic.com
        ReportedBy: k.hara.pg at gmail.com


--- Comment #0 from Kenji Hara <k.hara.pg at gmail.com> 2013-09-29 23:12:19 PDT ---
>From fail_compilation/fail235.d:


template Tuple(TPL...)
{
    alias TPL Tuple;
}
auto K = Tuple!(typeid(char));  // Line 5

template Alias(alias A)
{
    alias A Alias;
}
auto A = Alias!(typeid(char));  // Line 11

Prints:
test.d(5): Error: expression & D10TypeInfo_a6__initZ is not a valid template
value argument
test.d(11): Error: expression & D10TypeInfo_a6__initZ is not a valid template
value argument

I think printing mangled symbol name is not good. Instead it should print:
test.d(5): Error: expression typeid(char) is not a valid template value
argument
test.d(11): Error: expression typeid(char) is not a valid template value
argument

-- 
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