Skip to content

Commit d35392d

Browse files
Merge pull request #8473 from dotty-staging/fix-#5278
Fix #5278: Add regression test
2 parents dd340af + 3ec7114 commit d35392d

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)