Skip to content

Commit 4561506

Browse files
authored
Merge pull request scala-js#13 from smarter/fix-union
UnionTypes.scala: Fix crash with recent Dotty
2 parents 25b2841 + e7cb6f2 commit 4561506

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/scala/UnionTypes.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ object UnionTypes {
3636
// calling `either` function with union typed value.
3737
println(either(divisionResultFailure))
3838

39-
val list: Cons | Empty = Cons(1, Cons(2, Cons(3, Empty())))
40-
val emptyList: Empty | Cons = Empty()
39+
val list: Cons[Int] | Empty = Cons(1, Cons(2, Cons(3, Empty())))
40+
val emptyList: Empty | Cons[Any] = Empty()
4141
println(list)
4242
println(emptyList)
4343

0 commit comments

Comments
 (0)