aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/refinedSubtyping.scala
Commit message (Collapse)AuthorAgeFilesLines
* Fixes suggested by reviews from @smarter.Martin Odersky2015-01-241-2/+1
| | | | Also, added tests trhat work now.
* Reorg of subtyping.Martin Odersky2015-01-011-0/+11
| | | | Plus, RefinedThis gets a second parameter, `level`. This will replace the first one in due time.
* Allow refinements that refine already refined types.Martin Odersky2014-11-261-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | Previously, a double definition errorfor `T` was produced in a case like this: type T1 = C { T <: A } type T2 = T1 { T <: B } This was caused by the way T1 was treated in the refinement class that is used to typecheck the type. Desugaring of T2 with `refinedTypeToClass` would give trait <refinement> extends T1 { type T <: B } and `normalizeToClassRefs` would transform this to: trait <refinement> extends C { type T <: A; type T <: B } Hence the double definition. The new scheme desugars the rhs of `T2` to: trait <refinement> extends C { this: T1 => type T <: B } which avoids the problem. Also, added tests that #232 (fix/boundsPropagation) indeed considers all refinements together when comparing refined types.
* Handling higher-kinded types with lambdasMartin Odersky2014-06-181-0/+19
Switch to the new scheme where higher-kinded types (and also some polymorphic type aliases) are represented as instances of Lambda traits.