Skip to content

Commit a213726

Browse files
committed
Another test
1 parent efc9bd2 commit a213726

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

tests/neg/i7926c.scala

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
trait A {
3+
def p: Int
4+
def getP = p
5+
}
6+
trait B extends A {
7+
def p: Int = 22
8+
}
9+
class C extends B {
10+
private def p: Int = 23 // error
11+
}
12+
@main def Test =
13+
C().getP // would crash with a duplicate method error if the private C#p was permitted

0 commit comments

Comments
 (0)