Thread overview | |||||
---|---|---|---|---|---|
|
September 10, 2012 [Issue 8636] New: inconsistent behavior with implicit imports | ||||
---|---|---|---|---|
| ||||
http://d.puremagic.com/issues/show_bug.cgi?id=8636 Summary: inconsistent behavior with implicit imports Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: nobody@puremagic.com ReportedBy: thelastmammoth@gmail.com --- Comment #0 from thelastmammoth@gmail.com 2012-09-09 17:43:50 PDT --- (bug filed in response to http://forum.dlang.org/thread/tscjzueypzuiptpkvxrb@forum.dlang.org) 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 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 14, 2013 [Issue 8636] inconsistent behavior with implicit imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to thelastmammoth@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=8636 --- Comment #1 from thelastmammoth@gmail.com 2013-02-14 13:35:26 PST --- 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. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- |
February 14, 2013 [Issue 8636] inconsistent behavior with implicit imports | ||||
---|---|---|---|---|
| ||||
Posted in reply to thelastmammoth@gmail.com | http://d.puremagic.com/issues/show_bug.cgi?id=8636 --- Comment #2 from thelastmammoth@gmail.com 2013-02-14 13:36:48 PST --- 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. -- 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