July 29 [Issue 24687] New: [REG2.110] Cannot cast string-imports to select overload anymore | ||||
---|---|---|---|---|
| ||||
https://issues.dlang.org/show_bug.cgi?id=24687 Issue ID: 24687 Summary: [REG2.110] Cannot cast string-imports to select overload anymore Product: D Version: D2 Hardware: All OS: All Status: NEW Severity: regression Priority: P1 Component: dmd Assignee: nobody@puremagic.com Reporter: kinke@gmx.net This fails with current stable (v2.110.0-beta.1+), but worked with v2.109: ``` void foo(string path); void foo(const(ubyte[]) data); void bar1() { foo(import("bla.txt")); } // matches both void bar2() { foo(cast(const(ubyte[])) import("bla.txt")); } // matches both! ``` Output: ``` reg.d(4): Error: `reg.foo` called with argument types `(string)` matches both: reg.d(1): `reg.foo(string path)` and: reg.d(2): `reg.foo(const(ubyte[]) data)` reg.d(5): Error: `reg.foo` called with argument types `(const(ubyte[]))` matches both: reg.d(1): `reg.foo(string path)` and: reg.d(2): `reg.foo(const(ubyte[]) data)` ``` -- |
Copyright © 1999-2021 by the D Language Foundation