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.
1 parent 1beb55f commit b3425acCopy full SHA for b3425ac
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