We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d23583d + b3425ac commit ae4ee41Copy full SHA for ae4ee41
compiler/test-resources/repl/i4010
@@ -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