From 7df0423e49e81904ba703d44b0389d3a544aa946 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 12 Jan 2015 12:36:45 +0100 Subject: Made constraint data structures pluggable. Factored out interface for constraints. Current implementation: NaiveConstraint. Preparing for a more efficient one. --- tests/pos/subtyping.scala | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'tests/pos/subtyping.scala') 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 + +} + -- cgit v1.2.3