[Issue 19848] New: colliding named imports in function silently fail to overload
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon May 6 10:38:11 UTC 2019
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: nobody at puremagic.com
Reporter: default_357-line at yahoo.de
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.
--
More information about the Digitalmars-d-bugs
mailing list