diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-02-17 16:41:33 +0100 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-02-17 16:41:33 +0100 |
commit | b10b5821f40ccfad5e97df754ec35be0d256e41e (patch) | |
tree | 88b39582e6a05a55e70cb748efebfc1d24020ba0 /test/disabled | |
parent | 91148376049a152edec12348ff9b7e9e93e6ebe1 (diff) | |
download | scala-b10b5821f40ccfad5e97df754ec35be0d256e41e.tar.gz scala-b10b5821f40ccfad5e97df754ec35be0d256e41e.tar.bz2 scala-b10b5821f40ccfad5e97df754ec35be0d256e41e.zip |
Closes #5452.
Instead of trying to track the fallback attempts we rely on the
context state to inform us which fallback is the last one.
setError cannot always be called in NoBestMethodAlternativeError
because inferMethodAlternative relies on side-effects.
Review by @paulp.
Diffstat (limited to 'test/disabled')
-rw-r--r-- | test/disabled/neg/t5452.check | 8 | ||||
-rw-r--r-- | test/disabled/neg/t5452.scala | 29 | ||||
-rw-r--r-- | test/disabled/pos/spurious-overload.scala | 32 |
3 files changed, 0 insertions, 69 deletions
diff --git a/test/disabled/neg/t5452.check b/test/disabled/neg/t5452.check deleted file mode 100644 index 2f35a45509..0000000000 --- a/test/disabled/neg/t5452.check +++ /dev/null @@ -1,8 +0,0 @@ -t5452.scala:28: error: overloaded method value apply with alternatives: - ()Queryable[CoffeesTable] <and> - (t: Tree)(implicit evidence$2: Manifest[CoffeesTable])Nothing <and> - (implicit evidence$1: Manifest[CoffeesTable])Nothing - cannot be applied to (Queryable[CoffeesTable]) - Queryable[CoffeesTable]( q.treeFilter(null) ) - ^ -one error found diff --git a/test/disabled/neg/t5452.scala b/test/disabled/neg/t5452.scala deleted file mode 100644 index 1032db7a4b..0000000000 --- a/test/disabled/neg/t5452.scala +++ /dev/null @@ -1,29 +0,0 @@ -// /scala/trac/5452/a.scala -// Mon Feb 13 22:52:36 PST 2012 - -// import scala.reflect.mirror._ - -trait Tree - -object Bip { - def ??? = sys.error("") -} -import Bip._ - -case class Queryable[T]() { - def treeFilter( t:Tree ) : Queryable[T] = ??? -} - -object Queryable { - def apply[T:Manifest] = ??? - def apply[T:Manifest]( t:Tree ) = ??? -} - -trait CoffeesTable{ - def sales : Int -} - -object Test extends App{ - val q = new Queryable[CoffeesTable] - Queryable[CoffeesTable]( q.treeFilter(null) ) -} diff --git a/test/disabled/pos/spurious-overload.scala b/test/disabled/pos/spurious-overload.scala deleted file mode 100644 index 9767a44eee..0000000000 --- a/test/disabled/pos/spurious-overload.scala +++ /dev/null @@ -1,32 +0,0 @@ -object Test extends App { - def foo(bar: Any) = bar - - val code = foo{ - object lazyLib { - - def delay[A](value: => A): Susp[A] = new SuspImpl[A](value) - - implicit def force[A](s: Susp[A]): A = s() - - abstract class Susp[+A] extends Function0[A] - - class SuspImpl[A](lazyValue: => A) extends Susp[A] { - private var maybeValue: Option[A] = None - - override def apply() = maybeValue match { - case None => - val value = lazyValue - maybeValue = Some(value) - value - case Some(value) => - value - } - } - } - - import lazyLib._ - - val s: Susp[Int] = delay { println("evaluating..."); 3 } - println("2 + s = " + (2 + s)) // implicit call to force() - } -}
\ No newline at end of file |