@@ -10,8 +10,8 @@ object approximateUnion {
1010 trait B extends C [B ] with D
1111
1212 val coin = true
13- val x = if (coin) new A else new B
14- val y = Some (if (coin) new A else new B )
13+ val x = if (coin) new A {} else new B {}
14+ val y = Some (if (coin) new A {} else new B {} )
1515
1616 val xtest : C [A | B ] & D = x
1717 val ytest : Some [C [A | B ] & D ] = y
@@ -22,8 +22,8 @@ object approximateUnion {
2222 trait B extends C [X [B ]] with D with E
2323
2424 val coin = true
25- val x = if (coin) new A else new B
26- val y = Some (if (coin) new A else new B )
25+ val x = if (coin) new A {} else new B {}
26+ val y = Some (if (coin) new A {} else new B {} )
2727
2828 val xtest : C [X [A & B ]] & D = x
2929 val ytest : Some [C [X [A & B ]] & D ] = y
@@ -42,8 +42,8 @@ object approximateUnion2 {
4242 trait B extends C [B ] with D
4343
4444 val coin = true
45- val x = if (coin) new A else new B
46- val y = Some (if (coin) new A else new B )
45+ val x = if (coin) new A {} else new B {}
46+ val y = Some (if (coin) new A {} else new B {} )
4747
4848 val xtest : C [_ >: A & B <: A | B ] & D = x
4949 val ytest : Some [C [_ >: A & B <: A | B ] & D ] = y
@@ -54,8 +54,8 @@ object approximateUnion2 {
5454 trait B extends C [X [B ]] with D with E
5555
5656 val coin = true
57- val x = if (coin) new A else new B
58- val y = Some (if (coin) new A else new B )
57+ val x = if (coin) new A {} else new B {}
58+ val y = Some (if (coin) new A {} else new B {} )
5959
6060 val xtest : C [_ >: X [A | B ] <: X [A & B ]] & D = x
6161 val ytest : Some [C [_ >: X [A | B ] <: X [A & B ]]] = y
@@ -74,8 +74,8 @@ object approximateUnion3 {
7474 trait B extends C [B ] with D
7575
7676 val coin = true
77- val x = if (coin) new A else new B
78- val y = Some (if (coin) new A else new B )
77+ val x = if (coin) new A {} else new B {}
78+ val y = Some (if (coin) new A {} else new B {} )
7979
8080 val xtest : C [A & B ] & D = x
8181 val ytest : Some [C [A & B ] & D ] = y
@@ -86,8 +86,8 @@ object approximateUnion3 {
8686 trait B extends C [X [B ]] with D with E
8787
8888 val coin = true
89- val x = if (coin) new A else new B
90- val y = Some (if (coin) new A else new B )
89+ val x = if (coin) new A {} else new B {}
90+ val y = Some (if (coin) new A {} else new B {} )
9191
9292 val xtest : C [X [A | B ]] & D = x
9393 val ytest2 : Some [C [X [A | B ]] & D ] = y
0 commit comments