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)` ```
probably related to the hex string flag recently merged that lets it implicitly cast either way.
@RazvanN7 created dlang/dmd pull request #16770 "Fix Bugzilla Issue 24687 - [REG2.110] Cannot cast string-imports to select overload anymore" fixing this issue: - Fix Bugzilla Issue 24687 - [REG2.110] Cannot cast string-imports to select overload anymore https://github.com/dlang/dmd/pull/16770
dlang/dmd pull request #16770 "Fix Bugzilla Issue 24687 - [REG2.110] Cannot cast string-imports to select overload anymore" was merged into stable: - 26388210582cee231823774feb307ca9b61e7777 by RazvanN7: Fix Bugzilla Issue 24687 - [REG2.110] Cannot cast string-imports to select overload anymore https://github.com/dlang/dmd/pull/16770
dlang/dmd pull request #16967 "Rebase stable6" was merged into master: - 6d09335cd20b1e6e9529c1e2715ce78a68bdc48d by RazvanN7: Fix Bugzilla Issue 24687 - [REG2.110] Cannot cast string-imports to select overload anymore https://github.com/dlang/dmd/pull/16967
dlang/dmd pull request #17069 "Merge stable" was merged into master: - 29a34181da51bff45a78f51cf5889349499d0dca by RazvanN7: Fix Bugzilla Issue 24687 - [REG2.110] Cannot cast string-imports to select overload anymore https://github.com/dlang/dmd/pull/17069