May 11, 2012 [Issue 8082] New: Invalid error messages based on module compilation order | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8082 Summary: Invalid error messages based on module compilation order Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: andrej.mitrovich@gmail.com --- Comment #0 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2012-05-11 02:56:30 PDT --- main.d that references an undefined function: module main; void main() { test(); // invalid call } and util.d: module util; import std.algorithm; bool canFindAny(string[] inputs, string target1) { foreach (input; inputs) { if (target1.canFind(input)) return true; } return false; } $ dmd main.d util.d main.d(4): Error: undefined identifier test D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(2837): Error: template std.algorithm.find does not match any function template declaration D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(2837): Error: template std.algorithm.find cannot deduce template function from argument types !("a == b",ubyte[],ubyte[])(ubyte[],ubyte[]) D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(2836): Error: template instance find!("a == b",ubyte[],ubyte[]) errors instantiating template Only the first error message should appear. If you comment out the call to "test()" in main.d, all errors are gone. Note that the order of compiling the modules changes the behavior, see: $ dmd util.d main.d $ main.d(4): Error: undefined identifier test $ dmd main.d util.d $ main.d(4): Error: undefined identifier test D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(2837): Error: template std.algorithm.find does not match any function template declaration D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(2837): Error: template std.algorithm.find cannot deduce template function from argument types !("a == b",ubyte[],ubyte[])(ubyte[],ubyte[]) D:\DMD\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d(2836): Error: template instance find!("a == b",ubyte[],ubyte[]) errors instantiating template -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
September 17, 2013 [Issue 8082] Invalid error messages based on module compilation order | ||||
---|---|---|---|---|
| ||||
Posted in reply to Andrej Mitrovic | http://d.puremagic.com/issues/show_bug.cgi?id=8082 Andrej Mitrovic <andrej.mitrovich@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #1 from Andrej Mitrovic <andrej.mitrovich@gmail.com> 2013-09-17 14:30:14 PDT --- Seems to be fixed in 2.063.2. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
Copyright © 1999-2021 by the D Language Foundation