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
{{ message }}
This repository has been archived by the owner on Nov 29, 2020. It is now read-only.
Convince Scalac that val x = ...; val y = x implies x.type = y.type.
You just need to drop the widen for that — but if you extend it to template bodies, that will make val y = x part of the computed APIs and harder to change. And if you don't extend it to bodies, it will make val have context-dependent semantics.
I am fine with context-dependent semantics, but I would prefer x.type = y.type to be visible only within the scope / package / file / module. The second part of this issue is not really important and mostly just for convenience in some very rare cases, so let's just drop it.
IMO there's another thing to solve, which is making x.type#A equal Y#A when Y <: Singleton if x: Y. This is only a problem because of null; I think it's safe to assume that if you're using singleton types with type projections deliberately, null isn't likely a problem for you.
Convince Scalac that all instances of a typeclass or a proposition have the same singleton type. Could be crucial for associated types...
Convince Scalac thatval x = ...; val y = x
impliesx.type = y.type
.The text was updated successfully, but these errors were encountered: