[Issue 24687] New: [REG2.110] Cannot cast string-imports to select overload anymore
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jul 29 12:40:52 UTC 2024
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 at puremagic.com
Reporter: kinke at 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)`
```
--
More information about the Digitalmars-d-bugs
mailing list