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

          Issue ID: 19848
           Summary: colliding named imports in function silently fail to
                    overload
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: [email protected]
          Reporter: [email protected]

consider:

module test;

import std.stdio;

void fooInt(int i) { writefln("int %s", i); }
void fooFloat(float f) { writefln("float %s", f); }

void main()
{
    import test : foo = fooInt;
    import test : foo = fooFloat;

    foo(5.0f);
}

This will error with "fooInt(int i) is not callable using argument types
float", even though a perfectly serviceable overload is available under the
name.

--

Reply via email to