[Issue 23638] [betterC] Better Error Message For Runtime Usage
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Jan 18 13:54:10 UTC 2023
https://issues.dlang.org/show_bug.cgi?id=23638
RazvanN <razvan.nitu1305 at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |razvan.nitu1305 at gmail.com
--- Comment #1 from RazvanN <razvan.nitu1305 at gmail.com> ---
Unfortunately, the problem comes from the fact that the hook uses typeid
internally. `dup` is just a normal template so the compiler does not give it
any special treatment. The source of this is that dup uses internally typeid to
pass a Typeinfo to the newarray hook (which currently is not templatized). Once
newarray is templatized and Typeinfo is not needed anymore, the problem will
disappear.
So, I guess, the real solution in this case is to templatize the _d_new_array
hook.
--
More information about the Digitalmars-d-bugs
mailing list