diff options
author | Martin Odersky <odersky@gmail.com> | 2015-01-08 11:40:59 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2015-01-08 11:40:59 +0100 |
commit | 979ff5e0dbffc66fd008be0544690dbd194fe066 (patch) | |
tree | d67cfa47dcb9851cbe4daba4939df3806b7c5419 /test | |
parent | 0a35baa8a1ed91a71398887ae7a1a08910e4faf0 (diff) | |
download | dotty-979ff5e0dbffc66fd008be0544690dbd194fe066.tar.gz dotty-979ff5e0dbffc66fd008be0544690dbd194fe066.tar.bz2 dotty-979ff5e0dbffc66fd008be0544690dbd194fe066.zip |
Simplify and fix bounds propagation in constraints.
The previous scheme did not ensure that transitivity was eliminated.
Example scenario:
We have in the constraint
P <: Q
for constrained variables P, Q and add
Q <: T
Previous propagation added the constraint and then tested
whether the bounds of all variables were satisfiable. For
Q we test
P <: T
but that is true because P <: Q and we already added the constraint Q <: T.
So we fail to add the constraint P <: T, and transitivity is no longer eliminated.
Instead we now test the new bounds (in this case P <: T) *before* adding
the new constraint Q <: T. This is also simpler than the previous scheme.
Diffstat (limited to 'test')
-rw-r--r-- | test/dotc/tests.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/dotc/tests.scala b/test/dotc/tests.scala index e12becd0c..71668823a 100644 --- a/test/dotc/tests.scala +++ b/test/dotc/tests.scala @@ -126,7 +126,7 @@ class tests extends CompilerTest { @Test def dotc_core_pickling = compileDir(dotcDir + "tools/dotc/core/pickling", failedOther)(allowDeepSubtypes) // Cannot emit primitive conversion from V to Z - @Test def dotc_transform = compileDir(dotcDir + "tools/dotc/transform", failedbyName)(allowDeepSubtypes) + @Test def dotc_transform = compileDir(dotcDir + "tools/dotc/transform", failedbyName) @Test def dotc_parsing = compileDir(dotcDir + "tools/dotc/parsing", failedOther) // Expected primitive types I - Ljava/lang/Object |