November 18, 2019 [Issue 20404] New: Can't disambiguate function calls made ambiguous by "import std" | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=20404 Issue ID: 20404 Summary: Can't disambiguate function calls made ambiguous by "import std" Product: D Version: D2 Hardware: x86_64 OS: Linux Status: NEW Severity: enhancement Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: mipri@minimaltype.com This complete program import std; void main() { writeln(isGraphical(' ')); } properly fails to compile with this error: Error: std.uni.isGraphical at /usr/include/dmd/phobos/std/uni.d(10350) conflicts with std.ascii.isGraphical at /usr/include/dmd/phobos/std/ascii.d(461) This correction of it also fails, however: import std; void main() { writeln(std.ascii.isGraphical(' ')); } // Error: undefined identifier ascii in module std Whereas a version that simply doesn't use "import std" doesn't exhibit the second failure: import std.ascii; import std.uni; import std.stdio; void main() { writeln(std.ascii.isGraphical(' ')); } -- |
Copyright © 1999-2021 by the D Language Foundation