May 06, 2019 [Issue 19848] New: colliding named imports in function silently fail to overload | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: default_357-line@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. -- |
Copyright © 1999-2021 by the D Language Foundation