[Issue 24003] return/scope inference does not end up in type to some degree

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jun 20 15:18:50 UTC 2023


https://issues.dlang.org/show_bug.cgi?id=24003

Dennis <dkorpel at live.nl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dkorpel at live.nl

--- Comment #1 from Dennis <dkorpel at live.nl> ---
(In reply to Bolpat from comment #0)
> Also, there’s some Schrödinger action going on with template type inference.

Yes, I'm all too aware of this.

It was decided at some point to make inferred `scope` and `return` not part of
the type mangle, so that there wouldn't be link errors between phobos compiled
with dip1000 and user code without it.

However, the compiler uses the mangle internally as the identity of a type. So
if two types have the same mangled name, they are considered equal.

I tried undoing this, but of course, that breaks everything, so it's going to
be hard to untangle the mess.

--


More information about the Digitalmars-d-bugs mailing list