www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 11144] New: Better diagnostic for typeid symbol

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: k.hara.pg gmail.com



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: -------
Sep 29 2013
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11144


Kenji Hara <k.hara.pg gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull



https://github.com/D-Programming-Language/dmd/pull/2600

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 29 2013
prev sibling next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11144




Commits pushed to master at https://github.com/D-Programming-Language/dmd

https://github.com/D-Programming-Language/dmd/commit/ba80caade73ef92d2b53e66af853d3bda215d308
fix Issue 11144 - Better diagnostic for typeid symbol

https://github.com/D-Programming-Language/dmd/commit/4e0e6b7eea0f82d5e00a5be65c8eb1206de04a0b


Issue 11144 - Better diagnostic for typeid symbol

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Sep 30 2013
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=11144


yebblies <yebblies gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |yebblies gmail.com
         Resolution|                            |FIXED


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