summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2016-08-11 17:17:38 +1000
committerAdriaan Moors <adriaan.moors@typesafe.com>2016-08-23 15:51:52 -0700
commit10aa78db5961284e0f4fb2fcb5a1f3bd7c357385 (patch)
tree925ca61e554816955470f42e3f34a47fc567b0f3 /test/files
parentc12dd768b6ec5db1ee5f9c811129332c8fcec2a6 (diff)
downloadscala-10aa78db5961284e0f4fb2fcb5a1f3bd7c357385.tar.gz
scala-10aa78db5961284e0f4fb2fcb5a1f3bd7c357385.tar.bz2
scala-10aa78db5961284e0f4fb2fcb5a1f3bd7c357385.zip
Address review comments
- clarify the intent of tests - Consolidate stripExistentialsAndTypeVars with similar logic in mergePrefixAndArgs - Refactor special cases in maybeRewrap The name isn't great, but I'm struggling to come up with a pithy way to describe the rogue band of types.
Diffstat (limited to 'test/files')
-rw-r--r--test/files/neg/lub-from-hell-2.scala7
-rw-r--r--test/files/pos/lub-from-hell.scala9
2 files changed, 9 insertions, 7 deletions
diff --git a/test/files/neg/lub-from-hell-2.scala b/test/files/neg/lub-from-hell-2.scala
index 96760c6edf..18c99dfada 100644
--- a/test/files/neg/lub-from-hell-2.scala
+++ b/test/files/neg/lub-from-hell-2.scala
@@ -4,3 +4,10 @@ class Test {
def bar(a: Boolean, b: scala.collection.mutable.SetLike[Any,scala.collection.mutable.Set[Any]], c: scala.collection.mutable.Buffer[Any]) = if (a) b else c
// bar produces an ill-bounded LUB in 2.11.8. After this commit, which fixes a bug in existential+refinement lubs, foo also fails.
}
+// This test case minimizes a case that stated to fail compile after my fixes in SI-5294.
+// `foo` used to compile for the wrong reason, `mergePrefixAndArgs` failed to transpose a
+// ragged matrix and skipped to the next level of the base type sequences to find a common type symbol.
+//
+// My changes fixed the root cause of the ragged matrix, which uncovered the latent bug.
+// For comparison, `bar` failed to compile before _and_ after my changes for the same reason:
+// f-bounded types involved in LUBs can sometimes produce an ill-bounded LUB.
diff --git a/test/files/pos/lub-from-hell.scala b/test/files/pos/lub-from-hell.scala
index a7d2a99b08..cb4b1733c7 100644
--- a/test/files/pos/lub-from-hell.scala
+++ b/test/files/pos/lub-from-hell.scala
@@ -1,11 +1,6 @@
class Test {
trait Tree
def foo(b: Boolean, buf: collection.mutable.ArrayBuffer[Any], acc: StringBuilder) = if (b) buf else acc
-
- // def bar(b: Boolean,
- // buf: scala.collection.IndexedSeqLike[Any,Cloneable with Mutable with Equals],
- // acc: scala.collection.IndexedSeqLike[_18,scala.collection.mutable.IndexedSeq[_18]] with scala.collection.IndexedSeqLike[_18,IndexedSeq[_18]] forSome { type _18 >: String with Char }
- // ) = if (b) buf else acc
-
-
}
+// This test case minimizes a case that failed to compile due to a bug in my work on
+// SI-5294. After refining my patches, it compiles again, as expected. \ No newline at end of file