[Issue 7330] New: Local imports are order sensitive
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Jan 20 12:54:09 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=7330
Summary: Local imports are order sensitive
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: peter.alexander.au at gmail.com
--- Comment #0 from Peter Alexander <peter.alexander.au at gmail.com> 2012-01-20 12:54:07 PST ---
According to the language reference: "The order in which ImportDeclarations
occur has no significance."
This is true for module scope imports in DMD (2.057 tested), but not for
function scope imports.
---
import std.stdio;
void main() {
writeln("foo"); //ok
}
---
void main() {
writeln("foo"); //ok
}
import std.stdio;
---
void main() {
import std.stdio;
writeln("foo"); // ok
}
---
void main() {
writeln("foo"); // error, writeln undefined
import std.stdio;
}
---
--
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