summaryrefslogtreecommitdiff
path: root/test/files/run/t8575c.scala
Commit message (Collapse)AuthorAgeFilesLines
* SI-8575 Fix subtyping transitivity with aliases, compound typesJason Zaugg2014-11-071-0/+23
Thanks to @b-studios and @Blaisorblade for investigation into this bug. `RefinedType#normalize` is responsible for flattening nested compound types to a flat representation. Types are normalized during `=:=` in search of a successful result. This means that `((A with B) with C) =:= (A with B with C)`. However, if we introduce a type alias for `A with B` on the LHS, the attempt at flattening is thwarted. This commit changes normalization of refined types. If a parent is an alias for another refined type, it is dealiased during the flattening process. Two tests are included. The first demonstrates a symptom of this problem: failure to install a bridge method resulted in a linkage error. The second test uses the reflection API to directly show transitivity of subtyping now holds. Targetting at 2.12, as bug fixes in subtyping usually can be shown to lead to binary incompatibilities between code using the old and new compilers.