summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-10-29 07:48:56 +0100
committerJason Zaugg <jzaugg@gmail.com>2012-10-29 07:48:56 +0100
commitf30f97273aa40600f0f8d7c3e96d0ab3e0eed318 (patch)
tree40014ec529231ae510ffadefb9724d702776c958
parent2d9b65b8fce13166f7fd521e433e18039356c4db (diff)
downloadscala-f30f97273aa40600f0f8d7c3e96d0ab3e0eed318.tar.gz
scala-f30f97273aa40600f0f8d7c3e96d0ab3e0eed318.tar.bz2
scala-f30f97273aa40600f0f8d7c3e96d0ab3e0eed318.zip
Use Typed rather than .setType
In response to pull request feedback.
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index 6a55b16275..c5bd92a943 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -2602,7 +2602,9 @@ trait Typers extends Modes with Adaptations with Tags {
}
// Don't leak implementation details into the type, see SI-6575
if (isPartial && !typedBlock.isErrorTyped)
- typedBlock modifyType (_ baseType PartialFunctionClass)
+ typedPos(tree.pos, mode, pt) {
+ Typed(typedBlock, TypeTree(typedBlock.tpe baseType PartialFunctionClass))
+ }
else typedBlock
}
}