aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/union.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2016-10-01 21:51:34 +0200
committerGuillaume Martres <smarter@ubuntu.com>2016-10-11 19:21:02 +0200
commit25c0398b6f07df2449652e66cef8b6a6d3d4c7ce (patch)
tree75124ba8ba9d7663b7c6f2b739c55f828406386e /tests/pos/union.scala
parent3d74bfa72bdc794cfb11b6afe15c77a5357617d1 (diff)
downloaddotty-25c0398b6f07df2449652e66cef8b6a6d3d4c7ce.tar.gz
dotty-25c0398b6f07df2449652e66cef8b6a6d3d4c7ce.tar.bz2
dotty-25c0398b6f07df2449652e66cef8b6a6d3d4c7ce.zip
Adapt tests
Diffstat (limited to 'tests/pos/union.scala')
-rw-r--r--tests/pos/union.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/pos/union.scala b/tests/pos/union.scala
new file mode 100644
index 000000000..8b20a8458
--- /dev/null
+++ b/tests/pos/union.scala
@@ -0,0 +1,11 @@
+object Test {
+
+ class A
+ class B extends A
+ class C extends A
+ class D extends A
+
+ val b = true
+ val x = if (b) new B else new C
+ val y: B | C = x
+}