summaryrefslogtreecommitdiff
path: root/src/library/scala/util/control
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-10-01 20:28:48 -0700
committerPaul Phillips <paulp@improving.org>2013-10-01 20:41:41 -0700
commit5708e9d73ba01c286d7155606b72caeab914face (patch)
tree422ca2158adb3392aa3826ea9ab9cae4a379f5ce /src/library/scala/util/control
parent95d5554b9a263e3eb060c181463234f3e79864ab (diff)
downloadscala-5708e9d73ba01c286d7155606b72caeab914face.tar.gz
scala-5708e9d73ba01c286d7155606b72caeab914face.tar.bz2
scala-5708e9d73ba01c286d7155606b72caeab914face.zip
SI-6680 unsoundness in gadt typing.
Introduces -Xstrict-inference to deal with the significant gap between soundness and what presently compiles. I'm hopeful that it's TOO strict, because it finds e.g. 75 errors compiling immutable/IntMap.scala, but it might be that bad.
Diffstat (limited to 'src/library/scala/util/control')
-rw-r--r--src/library/scala/util/control/TailCalls.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/library/scala/util/control/TailCalls.scala b/src/library/scala/util/control/TailCalls.scala
index c3e7d98073..953d5b407e 100644
--- a/src/library/scala/util/control/TailCalls.scala
+++ b/src/library/scala/util/control/TailCalls.scala
@@ -55,7 +55,7 @@ object TailCalls {
case Done(a) => Call(() => f(a))
case c@Call(_) => Cont(c, f)
// Take advantage of the monad associative law to optimize the size of the required stack
- case Cont(s, g) => Cont(s, (x:Any) => g(x).flatMap(f))
+ case c: Cont[a1, b1] => Cont(c.a, (x: a1) => c f x flatMap f)
}
/** Returns either the next step of the tailcalling computation,