← Back to index
|
Original Bugzilla link
Bug 24687 – [REG2.110] Cannot cast string-imports to select overload anymore
Status
RESOLVED
Resolution
FIXED
Severity
regression
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2024-07-29T12:40:52Z
Last change time
2024-11-16T23:27:10Z
Keywords
pull
Assigned to
No Owner
Creator
kinke
Comments
Comment #0
by kinke — 2024-07-29T12:40:52Z
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)` ```
Comment #1
by destructionator — 2024-07-29T12:50:49Z
probably related to the hex string flag recently merged that lets it implicitly cast either way.
Comment #2
by dlang-bot — 2024-08-05T15:51:04Z
@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
Comment #3
by dlang-bot — 2024-08-06T00:07:48Z
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
Comment #4
by dlang-bot — 2024-10-07T09:00:26Z
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
Comment #5
by dlang-bot — 2024-11-16T23:27:10Z
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