summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2012-12-11 23:56:10 +0100
committerJason Zaugg <jzaugg@gmail.com>2012-12-12 07:19:55 +0100
commit286dced26e0d12796ab183b273ce6f00da182709 (patch)
tree47c4a6708bf226fbf3111b4e7652e0f0e2b788ea /src/compiler
parentf69b8468b76edc9f25a4cb97022a136be988b236 (diff)
downloadscala-286dced26e0d12796ab183b273ce6f00da182709.tar.gz
scala-286dced26e0d12796ab183b273ce6f00da182709.tar.bz2
scala-286dced26e0d12796ab183b273ce6f00da182709.zip
SI-6288 Remedy ill-positioned extractor binding.
The call to `Option#get` on the result of the unapply method was unpositioned and ended up with the position of the `match`.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala b/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
index 8582a773c3..fa8aff5cdd 100644
--- a/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
@@ -879,7 +879,7 @@ trait PatternMatching extends Transform with TypingTransformers with ast.TreeDSL
override def transform(tree: Tree): Tree = {
def subst(from: List[Symbol], to: List[Tree]): Tree =
if (from.isEmpty) tree
- else if (tree.symbol == from.head) typedIfOrigTyped(to.head.shallowDuplicate, tree.tpe)
+ else if (tree.symbol == from.head) typedIfOrigTyped(to.head.shallowDuplicate.setPos(tree.pos), tree.tpe)
else subst(from.tail, to.tail)
tree match {