aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/subtyping.scala
diff options
context:
space:
mode:
authorodersky <odersky@gmail.com>2015-01-31 19:19:07 +0100
committerodersky <odersky@gmail.com>2015-01-31 19:19:07 +0100
commita822fc15235d9cc91302bd82d180830eff357ae2 (patch)
tree3bd15eecb77b1fca0b944ba5f203ba6f5c41a582 /tests/pos/subtyping.scala
parent537c53b2eba195317f0e7f0ede0cf3fdbd80e790 (diff)
parent70e55d26100199b99502705233786bbdc15c4c6b (diff)
downloaddotty-a822fc15235d9cc91302bd82d180830eff357ae2.tar.gz
dotty-a822fc15235d9cc91302bd82d180830eff357ae2.tar.bz2
dotty-a822fc15235d9cc91302bd82d180830eff357ae2.zip
Merge pull request #331 from dotty-staging/fix/refined-subtyping
Fix/refined subtyping
Diffstat (limited to 'tests/pos/subtyping.scala')
-rw-r--r--tests/pos/subtyping.scala13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/pos/subtyping.scala b/tests/pos/subtyping.scala
index 95e813bdd..29d830dd2 100644
--- a/tests/pos/subtyping.scala
+++ b/tests/pos/subtyping.scala
@@ -16,4 +16,17 @@ object test {
}
+object test2 {
+
+ class A
+ class B
+
+ val x: A | B = ???
+ val y: B | A = x
+
+ val a: A & B = ???
+ val b: B & A = a
+
+}
+