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 5bf3227 commit 5a15892Copy full SHA for 5a15892
compiler/test-resources/repl/10693
@@ -0,0 +1,16 @@
1
+scala> def test[A, B](a: A, b: B): A | B = a
2
+def test[A, B](a: A, b: B): A | B
3
+scala> def d0 = test("string", 1)
4
+def d0: String | Int
5
+scala> def d1 = test(1, "string")
6
+def d1: Int | String
7
+scala> def d2 = test(d0, d1)
8
+def d2: String | Int
9
+scala> def d3 = test(d1, d0)
10
+def d3: Int | String
11
+scala> def d4 = test(d2, d3)
12
+def d4: String | Int
13
+scala> def d5 = test(d3, d2)
14
+def d5: Int | String
15
+scala> def d6 = test(d4, d5)
16
+def d6: String | Int
0 commit comments