[Bug d/95120] [D] Incorrectly allows fqdn access to imported symbols when doing selective imports.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95120 Iain Buclaw changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |INVALID --- Comment #3 from Iain Buclaw --- (In reply to Witold Baryluk from comment #0) > Created attachment 48529 [details] > Example of incorrectly accepted d source by gdc-10 > > gdc does violatate D language spec: > > https://dlang.org/spec/module.html#selective_imports > This bug (upstream http://issues.dlang.org/show_bug.cgi?id=313) was first deprecated in 2.070, then made an error in 2.083, The upstream front-end merged in gdc is based off 2.076. Please compile with -Wdeprecated.
[Bug d/95120] [D] Incorrectly allows fqdn access to imported symbols when doing selective imports.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95120 --- Comment #2 from Witold Baryluk --- Created attachment 48530 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=48530&action=edit Minimized example
[Bug d/95120] [D] Incorrectly allows fqdn access to imported symbols when doing selective imports.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95120 --- Comment #1 from Witold Baryluk --- Further minimized: == import std.stdio; import std.algorithm.comparison : min; int main() { return std.algorithm.comparison.min(3, 2); } == Removing `import std.stdio;`, results in the same error messages in gdc-10, dmd and ldc2. $ gdc badimport.d badimport.d:5:10: error: undefined identifier ‘std’ 5 | return std.algorithm.comparison.min(3, 2); | ^ $ $ ldc2 badimport.d badimport.d(5): Error: undefined identifier std $ dmd badimport.d badimport.d(5): Error: undefined identifier std $ it complains about `unknown std`. When I use `import std.stdio;` at the start, dmd and ldc complain about `unknown algorithm in package std`. Not sure if this is something in `std.stdio` package maybe.