summaryrefslogtreecommitdiff
path: root/test/pending/pos/those-kinds-are-high.scala
Commit message (Collapse)AuthorAgeFilesLines
* remove test/pending directory tooSeth Tisue2017-03-211-96/+0
| | | | | it will all stay right there in the Git history to be consulted anytime we want...
* Add PolyType to Infer#normalize.Paul Phillips2013-01-261-5/+48
| | | | | | | | | | | It arises when inferring the type of an overloaded call: def g(s: String): String = s def f: String = ??? def f[C](c: C): String = g(f) Also refined warning when isHKSubType is called with arguments which very likely were never meant to be compared.
* Moved and edited tests.Paul Phillips2012-02-231-1/+17
| | | | | | Remove obsolete, move passing pending -> files, update those-kinds-are-high with some new info, added a couple new ones to pending.
* Begone t1737...Hubert Plociniczak2011-11-021-5/+5
|
* Added sanity check to lub calculation to preven...Paul Phillips2011-06-241-0/+37
Added sanity check to lub calculation to prevent invalid lubs from emerging. The underlying cause of said lubs is that higher-order type parameters are not handled correctly: this is why the issue is seen so frequently in the collections. See pending test pending/pos/those-kinds-are-high.scala for a demonstration. Until that's fixed, we can at least raise the bar a bit. Closes #2094, #2322, #4501. Also, some test cases in neg have been promoted into working programs: #2179, #3774. (They're not in neg for the "shouldn't work" reason, but out of despair.) In some cases, such as the original reported ticket in #3528, this only pushes the problem downfield: it still fails due to inferred type parameters not conforming to bounds. I believe a similar issue with higher-order type parameters underlies that. Look at how far this takes us though. All kinds of stuff which did not work, now works. None of these even compiled until now: scala> :type List(mutable.Map(1 -> 1), immutable.Map(1 -> 1)) List[scala.collection.Map[Int,Int]] scala> :type Set(List(1), mutable.Map(1 -> 1)) scala.collection.Set[Iterable[Any] with PartialFunction[Int,Int]] scala> :type Stream(List(1), Set(1), 1 to 5) Stream[Iterable[Int] with Int => AnyVal{def getClass(): Class[_ >: Int with Boolean <: AnyVal]}] scala> :type Map(1 -> (1 to 10), 2 -> (1 to 10).toList) scala.collection.immutable.Map[Int,scala.collection.immutable.Seq[Int] ] PERFORMANCE: compiling quick.lib and quick.comp, this patch results in an extra 27 subtype tests. Total. Time difference too small to measure. However to be on the safe side I made it really easy to disable. private final val verifyLubs = true // set to false Review by moors, odersky.