From 7f721438b5bccc8ca9dd68cef273c8cac8199e1a Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Wed, 18 Jun 2014 18:20:14 +0200 Subject: Handling higher-kinded types with lambdas Switch to the new scheme where higher-kinded types (and also some polymorphic type aliases) are represented as instances of Lambda traits. --- tests/pos/refinedSubtyping.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 tests/pos/refinedSubtyping.scala (limited to 'tests/pos/refinedSubtyping.scala') diff --git a/tests/pos/refinedSubtyping.scala b/tests/pos/refinedSubtyping.scala new file mode 100644 index 000000000..e97d2a264 --- /dev/null +++ b/tests/pos/refinedSubtyping.scala @@ -0,0 +1,19 @@ +class Test { + + class C { type T; type Coll } + + type T1 = C { type T = Int } + + type T11 = T1 { type Coll = Set[Int] } + + type T2 = C { type Coll = Set[T] } + + type T22 = T2 { type T = Int } + + var x: T11 = _ + var y: T22 = _ + + x = y + y = x + +} -- cgit v1.2.3