[Issue 13767] Template type inference fails when destructuring shared type

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sat Jul 1 21:37:47 PDT 2017


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

--- Comment #2 from monkeyworks12 at hotmail.com ---
I'm assuming in your example you meant to use : instead of ==.

That aside, why shouldn't this work? I'm trying to destructure some type which
matches the pattern `shared U`. `shared const(int)` *should* match that
pattern. What I'm trying to express is `∃ U: shared U == shared const int`; it
seems incorrect to me that that I should have to use the subtyping form of is.

--


More information about the Digitalmars-d-bugs mailing list