diff options
Diffstat (limited to 'test/files/pos')
-rw-r--r-- | test/files/pos/t4970b.scala | 32 | ||||
-rw-r--r-- | test/files/pos/t7853-partial-function.scala | 7 | ||||
-rw-r--r-- | test/files/pos/t7853.scala | 11 |
3 files changed, 50 insertions, 0 deletions
diff --git a/test/files/pos/t4970b.scala b/test/files/pos/t4970b.scala new file mode 100644 index 0000000000..cf9a6a6ae9 --- /dev/null +++ b/test/files/pos/t4970b.scala @@ -0,0 +1,32 @@ +object Traits { + trait OuterClass[V <: OuterClass[V]#InnerClass] { + trait InnerClass {self: V => + def method = () + } + } + + trait SubOuterClass[T <: SubOuterClass[T]#SubInnerClass] extends OuterClass[T] { + trait SubInnerClass extends super.InnerClass {self: T => } + } + + trait SubOuterClass2[T <: SubOuterClass2[T]#SubInnerClass2] extends OuterClass[T] { + trait SubInnerClass2 extends super.InnerClass {self: InnerClass with T => } + } + +} + +// object Classes { +// class OuterClass[V <: OuterClass[V]#InnerClass] { +// class InnerClass {self: V => +// def method = () +// } +// } + +// class SubOuterClass[T <: SubOuterClass[T]#SubInnerClass] extends OuterClass[T] { +// class SubInnerClass extends super.InnerClass {self: T => } +// } + +// class SubOuterClass2[T <: SubOuterClass2[T]#SubInnerClass2] extends OuterClass[T] { +// class SubInnerClass2 extends super.InnerClass {self: InnerClass with T => } +// } +// } diff --git a/test/files/pos/t7853-partial-function.scala b/test/files/pos/t7853-partial-function.scala new file mode 100644 index 0000000000..b09254e99a --- /dev/null +++ b/test/files/pos/t7853-partial-function.scala @@ -0,0 +1,7 @@ +object Test { + + def testCons: Unit = { + def x[A](a: PartialFunction[Any, A]): A = a(0) + val eval0 = x { case list: List[Int @unchecked] => list } + } +} diff --git a/test/files/pos/t7853.scala b/test/files/pos/t7853.scala new file mode 100644 index 0000000000..b0e9221e22 --- /dev/null +++ b/test/files/pos/t7853.scala @@ -0,0 +1,11 @@ +trait S { + trait T { + this: Any => + + trait U { + trait V { + S.this + } + } + } +} |