Skip to content

Commit d1014c3

Browse files
committed
Add pos test about escaping refinements
1 parent c9c8f22 commit d1014c3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

tests/pos/escapingRefs.scala

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ class Outer {
44
}
55
}
66

7+
class HasA { type A }
8+
79
object Test {
810
def test = {
911
val a: Outer#Inner = {
@@ -16,5 +18,13 @@ object Test {
1618
val i = new o.Inner
1719
new i.Inner2
1820
}
21+
22+
val c: HasA { type A = Int } = {
23+
val h = new HasA {
24+
type A = Int
25+
}
26+
val x: HasA { type A = h.A } = h
27+
x
28+
}
1929
}
2030
}

0 commit comments

Comments
 (0)