aboutsummaryrefslogtreecommitdiff
path: root/tests/pos/subtyping.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2015-01-12 12:36:45 +0100
committerMartin Odersky <odersky@gmail.com>2015-01-12 12:36:45 +0100
commit7df0423e49e81904ba703d44b0389d3a544aa946 (patch)
tree0c19deb93a0996850aed3962e87372da6619b629 /tests/pos/subtyping.scala
parent9c53aaa7e3381eb684ff7eb71ab8b980cfa51abc (diff)
downloaddotty-7df0423e49e81904ba703d44b0389d3a544aa946.tar.gz
dotty-7df0423e49e81904ba703d44b0389d3a544aa946.tar.bz2
dotty-7df0423e49e81904ba703d44b0389d3a544aa946.zip
Made constraint data structures pluggable.
Factored out interface for constraints. Current implementation: NaiveConstraint. Preparing for a more efficient one.
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
+
+}
+