You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Change MT reduction to call normalized rather than simplified
Transcribing and paraphrasing from smarter's comment in
#16408 (comment) :
Type erasure assumes method signatures aren't simplified, since
simplification logic is implementation-defined. For instance, some
intersection types can be simplified down, but intersection types and
their simplification can erase to different types - prefering classes
over traits, for instance (for Java interop, as it matches Java's
erasure).
Also note, simplify doesn't simplify intersections and unions in Type
mode. But Match Types will cache their reduction without considering
the type mode as a cache input, thus the simplified reduction leaks even
when called in Type mode.
Perhaps we don't need to reach for simplified and can simplify normalise
down the reduced case (allowing for recursive match types to reduce
down). Also the desire is to have both reducing cases normalize, rather
than just the first one.
0 commit comments