[Issue 7913] New: Strange triggering of irrelevant compilation errors
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Apr 14 16:27:27 PDT 2012
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 at puremagic.com
ReportedBy: marcianx at gmail.com
--- Comment #0 from marcianx at gmail.com 2012-04-14 16:28:16 PDT ---
This is with the linux (openSUSE) DMD64 v2.059.
Here is the code of interest.
----------
import std.stdio;
void println(int i) { writeln(i); } // Bug trigger #1
void main()
{
// methods of Exception
auto b = [ __traits(allMembers, Exception) ];
writeln(b); // Bug trigger #2
asdf; // Bug trigger #3 (intentional compilation error)
}
----------
If Bug trigger #3 is commented, then it compiles without output (as
expected) with
----------
$ dmd unexpected_error_messages.d
----------
If I comment out EITHER Bug trigger #1 or #2 then I receive the expected
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: -------
More information about the Digitalmars-d-bugs
mailing list