summaryrefslogtreecommitdiff
path: root/test/files/run/lub-visibility.check
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-08-10 16:19:19 -0700
committerPaul Phillips <paulp@improving.org>2012-08-11 08:29:22 -0700
commitdb46c71e8830639bc79e6363332a06642fd3d8cc (patch)
tree52b5457a53bac5119522611cbbc4d40da1a1f76b /test/files/run/lub-visibility.check
parent48d9fb7307fb6519fe786a7d9be97996c5812fb7 (diff)
downloadscala-db46c71e8830639bc79e6363332a06642fd3d8cc.tar.gz
scala-db46c71e8830639bc79e6363332a06642fd3d8cc.tar.bz2
scala-db46c71e8830639bc79e6363332a06642fd3d8cc.zip
Improvement for SI-2251, failure to lub f-bounds.
After a great struggle, I realized that the major reason that code like this still doesn't compile: List(Stream(), List()) is that we were poisoning the computed lub in mergePrefixAndArgs by throwing in Any when the max recursion depth was reached. I modified it to return NoType instead, which allowed me to teach lublist to recognize what has happened and fall back to a weaker type, one which does not contain recursive bounds. This enables the lubbing process to complete. The most elusive lub, defeated. Notice also that the refinement members are correctly parameterized on Nothing, rather than on Any as has often been the case. scala> List(Stream(), List()) res0: List[scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.LinearSeq with scala.collection.AbstractSeq]; def reverse: scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.LinearSeq with scala.collection.AbstractSeq]; def reverse: scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]{def reverse: scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]; def dropRight(n: Int): scala.collection.immutable.LinearSeq[Nothing] with scala.collection.AbstractSeq[Nothing]; def takeRight(n: ...
Diffstat (limited to 'test/files/run/lub-visibility.check')
-rw-r--r--test/files/run/lub-visibility.check2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/files/run/lub-visibility.check b/test/files/run/lub-visibility.check
index 3461d1bf6b..f3a6bef215 100644
--- a/test/files/run/lub-visibility.check
+++ b/test/files/run/lub-visibility.check
@@ -8,7 +8,7 @@ scala> // should infer List[scala.collection.immutable.Seq[Nothing]]
scala> // but reverted that for SI-5534.
scala> val x = List(List(), Vector())
-x: List[scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with scala.collection.AbstractSeq{def dropRight(n: Int): scala.collection.immutable.Seq[Any] with scala.collection.AbstractSeq[Any]; def takeRight(n: Int): scala.collection.immutable.Seq[Any] with scala.collection.AbstractSeq[Any]; def drop(n: Int): scala.collection.immutable.Seq[Any] with scala.collection.AbstractSeq[Any]; def take(n: Int): scala.collection.immutable.Seq[Any] with scala.collection.AbstractSeq[Any]; def slice(from: Int,until: Int): scala.collection.immutable.Seq[Any] with scala.collection.AbstractSeq[Any]}]; def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.Ab...
+x: List[scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with scala.collection.AbstractSeq]; def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def companion: scala.collection.generic.GenericCompanion[scala.collection.immutable.Seq with scala.collection.AbstractSeq]; def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]{def dropRight(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def takeRight(n: Int): scala.collection.immutable.Seq[Nothing] with scala.collection.AbstractSeq[Nothing]; def drop(n: Int): scala.collecti...
scala>
scala>