www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20404] New: Can't disambiguate function calls made ambiguous


          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

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(' '));

Nov 17 2019