diff options
author | Martin Odersky <odersky@gmail.com> | 2015-01-12 12:36:45 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-01-12 12:36:45 +0100 |
commit | 7df0423e49e81904ba703d44b0389d3a544aa946 (patch) | |
tree | 0c19deb93a0996850aed3962e87372da6619b629 /tests/pos/subtyping.scala | |
parent | 9c53aaa7e3381eb684ff7eb71ab8b980cfa51abc (diff) | |
download | dotty-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.scala | 13 |
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 + +} + |