Skip to content

Commit ae4ee41

Browse files
authored
Merge pull request #6869 from dotty-staging/fix-#4010
Fix #4010: Add regression test
2 parents d23583d + b3425ac commit ae4ee41

File tree

1 file changed

+6
-0
lines changed
  • compiler/test-resources/repl

1 file changed

+6
-0
lines changed

compiler/test-resources/repl/i4010

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
scala> trait TmpT { type A; type B; type AorB = A | B ; def fromA(a: A): AorB = a; def fromB(b: B): AorB = b }
2+
// defined trait TmpT
3+
scala> object TmpO extends TmpT{ type A = 7; type B = 8 }
4+
// defined object TmpO
5+
scala> val x: TmpO.AorB = TmpO.fromA(7)
6+
val x: TmpO.AorB = 7

0 commit comments

Comments
 (0)