Skip to content

Commit 8daa7a0

Browse files
committed
Added test case for mulitple simplifications in a row.
1 parent 0f4c852 commit 8daa7a0

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/pos/reduce-projections.scala

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// This test case is intended to verify that reduce projection
2+
// works across multiple refinements. When running with -Xprint:front
3+
// The inferred type of y and yy should be String.
4+
// It would be good to improve our testing framework so
5+
// that we can verify this. With partest, it would be easy.
6+
class ABC { type A; type B; type C }
7+
8+
object Test {
9+
10+
val x: (ABC { type C = String; type B = C; type A = B }) # A = ???
11+
12+
val y = x // should expand to: val y: String = x
13+
14+
val xx: (ABC { type C = String } { type B = C } { type A = B }) # A = ???
15+
16+
val yy = x // should expand to: val y: String = x
17+
18+
}

0 commit comments

Comments
 (0)