← Back to index
|
Original Bugzilla link
Bug 8636 – inconsistent behavior with implicit imports
Status
RESOLVED
Resolution
WORKSFORME
Severity
normal
Priority
P2
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2012-09-09T17:43:50Z
Last change time
2022-09-08T09:00:41Z
Assigned to
No Owner
Creator
thelastmammoth
Comments
Comment #0
by thelastmammoth — 2012-09-09T17:43:50Z
(bug filed in response to
http://forum.dlang.org/thread/
[email protected]
)
This compiles but shouldn't: (needs explicit import) ---- import std.stdio; void main(){ writeln(std.conv.to!double(1)); } ---- This doesn't compile (and shouldn't): ---- import std.stdio; void main(){ std.stdio.writeln(std.conv.to!double(1)); } ---- =>Error: undefined identifier std
Comment #1
by thelastmammoth — 2013-02-14T13:35:26Z
probably related: ---- fun.d void test(){ std.file.write("", []);} ---- dmd -c fun.d Error: undefined identifier std ---- fun.d import std.stdio; void test(){ std.file.write("", []);} ---- dmd -c fun.d Error: undefined identifier 'file' ---- fun.d import std.path; void test(){ std.file.write("", []);} ---- dmd -c fun.d compiles but shouldn't. What's also weird is the difference in error msg in case 1 and 2 above.
Comment #2
by thelastmammoth — 2013-02-14T13:36:48Z
probably related: ---- fun.d void test(){ std.file.write("", []);} ---- dmd -c fun.d Error: undefined identifier std ---- fun.d import std.stdio; void test(){ std.file.write("", []);} ---- dmd -c fun.d Error: undefined identifier 'file' ---- fun.d import std.path; void test(){ std.file.write("", []);} ---- dmd -c fun.d compiles but shouldn't. What's also weird is the difference in error msg in case 1 and 2 above.
Comment #3
by razvan.nitu1305 — 2022-09-08T09:00:41Z
I cannot reproduce the original bug report. Closing as worksforme.