www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 18243] New: selective import + overload = private visibility

https://issues.dlang.org/show_bug.cgi?id=18243

          Issue ID: 18243
           Summary: selective import + overload = private visibility
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: blocker
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: rumbu rumbu.ro

module a;

private import std.math: isNaN;

//custom overload
public bool isNaN(int i) { return false; }


=============================

module b;
import a;

void foo()
{
    bool b = isNaN(float.nan);
    //compiles successfully calling std.math.isNaN even it should not be
visible.
}

--
Jan 16