diff options
author | Paul Phillips <paulp@improving.org> | 2012-03-16 06:32:46 -0700 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2012-03-16 08:04:46 -0700 |
commit | bc7bf663f2df564805fa5121de7b0006cf2149f2 (patch) | |
tree | 73edb30907fb326494f4576b53bd4d45e0201916 /src | |
parent | f987afe55e6d4f71c7e9ad10d1ca9f6120dc1132 (diff) | |
download | scala-bc7bf663f2df564805fa5121de7b0006cf2149f2.tar.gz scala-bc7bf663f2df564805fa5121de7b0006cf2149f2.tar.bz2 scala-bc7bf663f2df564805fa5121de7b0006cf2149f2.zip |
Finish fixing range positions.
At least, I think so.
Diffstat (limited to 'src')
-rw-r--r-- | src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala | 2 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala index 87251b4cc9..4b7c03b72a 100644 --- a/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala +++ b/src/compiler/scala/tools/nsc/ast/parser/TreeBuilder.scala @@ -216,7 +216,7 @@ abstract class TreeBuilder { def makeNew(parents: List[Tree], self: ValDef, stats: List[Tree], argss: List[List[Tree]], npos: Position, cpos: Position): Tree = if (parents.isEmpty) - makeNew(List(atPos(npos union cpos)(scalaAnyRefConstr)), self, stats, argss, npos, cpos) + makeNew(List(scalaAnyRefConstr), self, stats, argss, npos, cpos) else if (parents.tail.isEmpty && stats.isEmpty) atPos(npos union cpos) { New(parents.head, argss) } else { diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index 973e26af41..c4880dd6d7 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -1295,7 +1295,7 @@ trait Typers extends Modes with Adaptations with PatMatVirtualiser { } def parentTypes(templ: Template): List[Tree] = - if (templ.parents.isEmpty) List(atPos(templ.pos.focus)(TypeTree(AnyRefClass.tpe))) + if (templ.parents.isEmpty) List(atPos(templ.pos)(TypeTree(AnyRefClass.tpe))) else try { val clazz = context.owner // Normalize supertype and mixins so that supertype is always a class, not a trait. |