Skip to content

Commit 8dd35ac

Browse files
committed
Add test case t10290
1 parent 8e85b39 commit 8dd35ac

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

tests/run/t10290.scala

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
trait A1 {
2+
private val s = "A1"
3+
def f = s
4+
}
5+
6+
trait A2 {
7+
private val s = "A2"
8+
def f = s
9+
}
10+
11+
class B extends A1 with A2 {
12+
override def f = "B"
13+
class C {
14+
def t1 = B.super[A1].f
15+
def t2 = B.super[A2].f
16+
def t3 = B.this.f
17+
}
18+
}
19+
20+
object Test {
21+
def main(args : Array[String]) : Unit = {
22+
val b = new B
23+
val c = new b.C
24+
assert(c.t1 == "A1")
25+
assert(c.t2 == "A2")
26+
assert(c.t3 == "B")
27+
}
28+
}

0 commit comments

Comments
 (0)