Skip to content

Commit 5a15892

Browse files
committed
Add test case supplied by @LucySMartin
1 parent 5bf3227 commit 5a15892

File tree

1 file changed

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

1 file changed

+16
-0
lines changed

compiler/test-resources/repl/10693

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)