Skip to content

Commit 23709ef

Browse files
authored
Merge pull request #2161 from dotty-staging/si4400
Test that SI-4400 stays fixed.
2 parents 054a4f9 + d0e52c8 commit 23709ef

File tree

1 file changed

+35
-0
lines changed

1 file changed

+35
-0
lines changed

tests/run/t4400.scala

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
final class Outer {
2+
3+
4+
5+
sealed trait Inner
6+
7+
8+
9+
final case class Inner1(foo: Int) extends Inner
10+
11+
12+
13+
val inner: Outer#Inner = Inner1(0)
14+
15+
16+
17+
def bar = inner match {
18+
19+
case Inner1(i) => i
20+
21+
}
22+
23+
}
24+
25+
26+
27+
object Test {
28+
29+
def main(args: Array[String]): Unit = {
30+
val s = (new Outer).bar
31+
assert(s == 0)
32+
}
33+
34+
}
35+

0 commit comments

Comments
 (0)