summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2011-10-31 16:37:59 +0000
committerPaul Phillips <paulp@improving.org>2011-10-31 16:37:59 +0000
commit8de176f454d1e365b1297de21a0ed4a45c04a87f (patch)
tree2196e6db505ef3d14075a1c6b87d46420cb2cf8a /src
parent62b01828347087f071c70ac191372a357c4fc787 (diff)
downloadscala-8de176f454d1e365b1297de21a0ed4a45c04a87f.tar.gz
scala-8de176f454d1e365b1297de21a0ed4a45c04a87f.tar.bz2
scala-8de176f454d1e365b1297de21a0ed4a45c04a87f.zip
Clean result of function type.
NullaryMethodType was escaping. Closes SI-5099, review by moors.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index f9c5e843b1..89eb6f2e91 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -1993,7 +1993,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser {
// }
var body = typed(fun.body, respt)
val formals = vparamSyms map (_.tpe)
- val restpe = packedType(body, fun.symbol).deconst
+ val restpe = packedType(body, fun.symbol).deconst.resultType
val funtpe = typeRef(clazz.tpe.prefix, clazz, formals :+ restpe)
// body = checkNoEscaping.locals(context.scope, restpe, body)
val fun1 = treeCopy.Function(fun, vparams, body).setType(funtpe)