Skip to content

Commit 3ec7114

Browse files
committed
Fix #5278: Add regression test
1 parent 31fc9ab commit 3ec7114

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/neg/i5278.scala

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
trait T { self: {type M = Int} =>
2+
type T = self.M
3+
def lift(x: Int): T = x
4+
}
5+
6+
class Test {
7+
val t = new T {
8+
type M = Int
9+
}
10+
t.lift(1): t.T // error
11+
}

0 commit comments

Comments
 (0)