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
When hash-consing TypeBounds, RefinedTypes and NamedTypes, we
now check the argument types with `eq`, where before it was `==`.
This is necessary for TypeBounds, because it makes a difference
whether a TypeBound has `eq` parts (then it is a type alias) or not.
So we cannot merge type aliases with non-aliases.
The symptom of the problem was when compiling Patterns.scala twice with
the new SeqLiterals phase (next commit) enabled. On second run, we encountered
an ArrayType[>: String <: String], even if we only created an ArrayType[String].
This was a consequence of the two types being identified by uniques.
Todo: Change the system so that type aliases are recognized more robustly.
But the present change seems to be useful anyway because it speeds up
uniques hashing. I verified that the stricter condition on uniques creates less
than 1% more types than before. So the speedup of hashing looks worthwhile.
0 commit comments