www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 7913] New: Strange triggering of irrelevant compilation errors

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

           Summary: Strange triggering of irrelevant compilation errors
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: DMD
        AssignedTo: nobody puremagic.com
        ReportedBy: marcianx gmail.com



This is with the linux (openSUSE) DMD64 v2.059.
Here is the code of interest.
----------
import std.stdio;



void main()
{
    // methods of Exception
    auto b = [ __traits(allMembers, Exception) ];



}
----------



expected) with
----------
$ dmd unexpected_error_messages.d
----------


compilation error
----------
unexpected_error_messages.d(12): Error: undefined identifier asdf
----------

If the code is compiled as-is, then I get this confusing mess of errors, the
latter of which seems completely irrelevant in this context. This might be
triggered by a bug.
----------
unexpected_error_messages.d(12): Error: undefined identifier asdf
/usr/include/d/dmd/phobos/std/conv.d(244): Error: template std.conv.toImpl does
not match any function template declaration
/usr/include/d/dmd/phobos/std/conv.d(244): Error: template std.conv.toImpl
cannot deduce template function from argument types !(string)(ubyte)
/usr/include/d/dmd/phobos/std/conv.d(244): Error: template instance
toImpl!(string) errors instantiating template
/usr/include/d/dmd/phobos/std/conv.d(3034): Error: template instance
std.conv.to!(string).to!(ubyte) error instantiating
/usr/include/d/dmd/phobos/std/conv.d(3016):        instantiated from here:
textImpl!(string,string,void*,string,int,string,int,string,char,string,ubyte,string,ubyte,string,bool,string,bool,string,bool,string,bool,string,bool,string,const(char)[],string,const(char)[],string)
/usr/include/d/dmd/phobos/std/format.d(1078):        instantiated from here:
text!(string,void*,string,int,string,int,string,char,string,ubyte,string,ubyte,string,bool,string,bool,string,bool,string,bool,string,bool,string,const(char)[],string,const(char)[],string)
/usr/include/d/dmd/phobos/std/format.d(392):        instantiated from here:
FormatSpec!(char)
/usr/include/d/dmd/phobos/std/stdio.d(687):        ... (1 instantiations, -v to
show) ...
/usr/include/d/dmd/phobos/std/stdio.d(1574):        instantiated from here:
write!(string[],char)
unexpected_error_messages.d(10):        instantiated from here:
writeln!(string[])
/usr/include/d/dmd/phobos/std/conv.d(3016): Error: template instance
std.conv.textImpl!(string,string,void*,string,int,string,int,string,char,string,ubyte,string,ubyte,string,bool,string,bool,string,bool,string,bool,string,bool,string,const(char)[],string,const(char)[],string)
error instantiating
/usr/include/d/dmd/phobos/std/format.d(1078):        instantiated from here:
text!(string,void*,string,int,string,int,string,char,string,ubyte,string,ubyte,string,bool,string,bool,string,bool,string,bool,string,bool,string,const(char)[],string,const(char)[],string)
/usr/include/d/dmd/phobos/std/format.d(392):        instantiated from here:
FormatSpec!(char)
/usr/include/d/dmd/phobos/std/stdio.d(687):        instantiated from here:
formattedWrite!(LockingTextWriter,char,string[])
/usr/include/d/dmd/phobos/std/stdio.d(1574):        instantiated from here:
write!(string[],char)
unexpected_error_messages.d(10):        instantiated from here:
writeln!(string[])
/usr/include/d/dmd/phobos/std/format.d(1078): Error: template instance
std.conv.text!(string,void*,string,int,string,int,string,char,string,ubyte,string,ubyte,string,bool,string,bool,string,bool,string,bool,string,bool,string,const(char)[],string,const(char)[],string)
error instantiating
/usr/include/d/dmd/phobos/std/format.d(392):        instantiated from here:
FormatSpec!(char)
/usr/include/d/dmd/phobos/std/stdio.d(687):        instantiated from here:
formattedWrite!(LockingTextWriter,char,string[])
/usr/include/d/dmd/phobos/std/stdio.d(1574):        instantiated from here:
write!(string[],char)
unexpected_error_messages.d(10):        instantiated from here:
writeln!(string[])
----------

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