Skip to content

Commit cb73f0b

Browse files
author
EnzeXing
committed
Add test for modifying this to AndType
1 parent f5313ae commit cb73f0b

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

tests/init-global/pos/i17997-2.scala

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
abstract class FunSuite:
2+
def foo(): Unit = println("FunSuite")
3+
4+
foo()
5+
6+
trait MySelfType
7+
8+
trait MyTrait extends FunSuite { this: MySelfType =>
9+
}
10+
11+
abstract class MyAbstractClass extends FunSuite { this: MySelfType & MyTrait =>
12+
13+
override def foo() = {
14+
println("MyAbstractClass")
15+
super.foo()
16+
}
17+
}
18+
19+
final class MyFinalClass extends MyAbstractClass with MyTrait with MySelfType:
20+
val n: Int = 100
21+
22+
object Main:
23+
(new MyFinalClass).foo()

0 commit comments

Comments
 (0)