aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/intersection.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-05-27 10:29:44 +0200
committerMartin Odersky <odersky@gmail.com>2015-05-27 10:30:56 +0200
commit397dfd6d564b032e5f1d52dda015ffb4238a595f (patch)
treed0d2d4280ec1eac3978cd80a83751deee534bf1d /tests/pos/intersection.scala
parent20f6e9d9efb6ece9a8844cfe011ac1cc663c378e (diff)
downloaddotty-397dfd6d564b032e5f1d52dda015ffb4238a595f.tar.gz
dotty-397dfd6d564b032e5f1d52dda015ffb4238a595f.tar.bz2
dotty-397dfd6d564b032e5f1d52dda015ffb4238a595f.zip
New pos tests
Some of them were moved from disabled after verifiying that they compile now.
Diffstat (limited to 'tests/pos/intersection.scala')
-rw-r--r--tests/pos/intersection.scala19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/pos/intersection.scala b/tests/pos/intersection.scala
new file mode 100644
index 000000000..2b9f6c0b7
--- /dev/null
+++ b/tests/pos/intersection.scala
@@ -0,0 +1,19 @@
+object intersection {
+
+ class A
+ class B
+
+ val x: A => Unit = ???
+ val y: B => Unit = ???
+
+ val z = if (???) x else y
+
+ val a: A & B => Unit = z
+ val b: (A => Unit) | (B => Unit) = z
+
+
+
+
+ type needsA = A => Nothing
+ type needsB = B => Nothing
+}