[Issue 4335] New: Wrong suggestion in error (import std.stdio for writeln)
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jun 16 16:38:51 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4335
Summary: Wrong suggestion in error (import std.stdio for
writeln)
Product: D
Version: D1
Platform: All
OS/Version: All
Status: NEW
Keywords: diagnostic
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: llucax at gmail.com
--- Comment #0 from Leandro Lucarella <llucax at gmail.com> 2010-06-16 16:38:49 PDT ---
I accidentally compiled some trivial D2 code with D1 and got a bad suggestion
from the compiler. Here is a trivial testcase:
---
import std.stdio;
void main() {
writeln("bug");
}
---
t.d(3): Error: 'writeln' is not defined, perhaps you need to import std.stdio;
?
t.d(3): Error: function expected before (), not __error of type _error_
Both errors are really confusing. First, std.stdio is already imported (but D1
doesn't have writeln(), just writefln()). Then there is a crpyptic error about
things that are not even present in the file.
--
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