summaryrefslogtreecommitdiff
path: root/src/compiler/scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2014-06-02 09:26:01 +0200
committerJason Zaugg <jzaugg@gmail.com>2014-06-02 09:26:01 +0200
commit300db2a1e3eefc2a6ed379c870bc7da42a26e69a (patch)
tree83b798dd9575581c21040c8774f9bcf262675505 /src/compiler/scala
parentec05aeb3d6e414d2abf8354849eeaa7cc75ee477 (diff)
parentd28879042951015f0ef2d5263b7df264a13a8055 (diff)
downloadscala-300db2a1e3eefc2a6ed379c870bc7da42a26e69a.tar.gz
scala-300db2a1e3eefc2a6ed379c870bc7da42a26e69a.tar.bz2
scala-300db2a1e3eefc2a6ed379c870bc7da42a26e69a.zip
Merge pull request #3799 from retronym/topic/8596-2.10
SI-8596 Fix rangepos crasher with defaults, poly methods
Diffstat (limited to 'src/compiler/scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
index 70f2f41ec7..307e17d97a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/NamesDefaults.scala
@@ -175,9 +175,9 @@ trait NamesDefaults { self: Analyzer =>
// setSymbol below is important because the 'selected' function might be overloaded. by
// assigning the correct method symbol, typedSelect will just assign the type. the reason
// to still call 'typed' is to correctly infer singleton types, SI-5259.
- val selectPos =
- if(qual.pos.isRange && baseFun.pos.isRange) qual.pos.union(baseFun.pos).withStart(Math.min(qual.pos.end, baseFun.pos.end))
- else baseFun.pos
+ val selectPos =
+ if(qual.pos.isRange && baseFun1.pos.isRange) qual.pos.union(baseFun1.pos).withStart(Math.min(qual.pos.end, baseFun1.pos.end))
+ else baseFun1.pos
val f = blockTyper.typedOperator(Select(newQual, selected).setSymbol(baseFun1.symbol).setPos(selectPos))
if (funTargs.isEmpty) f
else TypeApply(f, funTargs).setType(baseFun.tpe)