Skip to content

Commit 6aefbbc

Browse files
committed
Rename Tree#sourcePos -> pos
1 parent 4c5c270 commit 6aefbbc

40 files changed

+193
-193
lines changed

compiler/src/dotty/tools/backend/sjs/JSCodeGen.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,7 +1608,7 @@ class JSCodeGen()(implicit ctx: Context) {
16081608

16091609
def requireNotSuper(): Unit = {
16101610
if (jsSuperClassValue.isDefined)
1611-
ctx.error("Illegal super call in Scala.js-defined JS class", tree.sourcePos)
1611+
ctx.error("Illegal super call in Scala.js-defined JS class", tree.pos)
16121612
}
16131613

16141614
def requireNotSpread(arg: js.TreeOrJSSpread): js.Tree =
@@ -1984,7 +1984,7 @@ class JSCodeGen()(implicit ctx: Context) {
19841984
if (sym.is(Trait)) {
19851985
ctx.error(
19861986
s"isInstanceOf[${sym.fullName}] not supported because it is a JS trait",
1987-
tree.sourcePos)
1987+
tree.pos)
19881988
js.BooleanLiteral(true)
19891989
} else {
19901990
js.Unbox(js.JSBinaryOp(

compiler/src/dotty/tools/dotc/ast/Desugar.scala

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -351,10 +351,10 @@ object desugar {
351351
val constrVparamss =
352352
if (originalVparamss.isEmpty) { // ensure parameter list is non-empty
353353
if (isCaseClass && originalTparams.isEmpty)
354-
ctx.error(CaseClassMissingParamList(cdef), cdef.sourcePos.withSpan(cdef.nameSpan))
354+
ctx.error(CaseClassMissingParamList(cdef), cdef.pos.withSpan(cdef.nameSpan))
355355
ListOfNil
356356
} else if (isCaseClass && originalVparamss.head.exists(_.mods.is(Implicit))) {
357-
ctx.error("Case classes should have a non-implicit parameter list", cdef.sourcePos.withSpan(cdef.nameSpan))
357+
ctx.error("Case classes should have a non-implicit parameter list", cdef.pos.withSpan(cdef.nameSpan))
358358
ListOfNil
359359
}
360360
else originalVparamss.nestedMap(toDefParam)
@@ -433,7 +433,7 @@ object desugar {
433433
appliedRef(enumClassRef)
434434
else {
435435
ctx.error(i"explicit extends clause needed because both enum case and enum class have type parameters"
436-
, cdef.sourcePos.startPos)
436+
, cdef.pos.startPos)
437437
appliedTypeTree(enumClassRef, constrTparams map (_ => anyRef))
438438
}
439439

@@ -637,15 +637,15 @@ object desugar {
637637
if (!isImplicit)
638638
Nil
639639
else if (ctx.owner is Package) {
640-
ctx.error(TopLevelImplicitClass(cdef), cdef.sourcePos)
640+
ctx.error(TopLevelImplicitClass(cdef), cdef.pos)
641641
Nil
642642
}
643643
else if (isCaseClass) {
644-
ctx.error(ImplicitCaseClass(cdef), cdef.sourcePos)
644+
ctx.error(ImplicitCaseClass(cdef), cdef.pos)
645645
Nil
646646
}
647647
else if (arity != 1) {
648-
ctx.error(ImplicitClassPrimaryConstructorArity(), cdef.sourcePos)
648+
ctx.error(ImplicitClassPrimaryConstructorArity(), cdef.pos)
649649
Nil
650650
}
651651
else
@@ -713,7 +713,7 @@ object desugar {
713713
.withSpan(mdef.span.startPos)
714714
val ValDef(selfName, selfTpt, _) = impl.self
715715
val selfMods = impl.self.mods
716-
if (!selfTpt.isEmpty) ctx.error(ObjectMayNotHaveSelfType(mdef), impl.self.sourcePos)
716+
if (!selfTpt.isEmpty) ctx.error(ObjectMayNotHaveSelfType(mdef), impl.self.pos)
717717
val clsSelf = ValDef(selfName, SingletonTypeTree(Ident(moduleName)), impl.self.rhs)
718718
.withMods(selfMods)
719719
.withSpan(impl.self.span.orElse(impl.span.startPos))
@@ -740,7 +740,7 @@ object desugar {
740740
*/
741741
def opaqueAlias(tdef: TypeDef)(implicit ctx: Context): Tree =
742742
if (tdef.rhs.isInstanceOf[TypeBoundsTree]) {
743-
ctx.error(em"opaque type ${tdef.name} must be an alias type", tdef.sourcePos)
743+
ctx.error(em"opaque type ${tdef.name} must be an alias type", tdef.pos)
744744
tdef.withFlags(tdef.mods.flags &~ Opaque)
745745
}
746746
else {
@@ -773,7 +773,7 @@ object desugar {
773773
val name = mdef.name
774774
if (ctx.owner == defn.ScalaPackageClass && defn.reservedScalaClassNames.contains(name.toTypeName)) {
775775
def kind = if (name.isTypeName) "class" else "object"
776-
ctx.error(em"illegal redefinition of standard $kind $name", mdef.sourcePos)
776+
ctx.error(em"illegal redefinition of standard $kind $name", mdef.pos)
777777
name.errorName
778778
}
779779
else name
@@ -1369,7 +1369,7 @@ object desugar {
13691369
elems foreach collect
13701370
case Alternative(trees) =>
13711371
for (tree <- trees; (vble, _) <- getVariables(tree))
1372-
ctx.error(IllegalVariableInPatternAlternative(), vble.sourcePos)
1372+
ctx.error(IllegalVariableInPatternAlternative(), vble.pos)
13731373
case Annotated(arg, _) =>
13741374
collect(arg)
13751375
case InterpolatedString(_, segments) =>

compiler/src/dotty/tools/dotc/ast/NavigateAST.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ object NavigateAST {
2020
case _ =>
2121
val loosePath = untypedPath(tree, exactMatch = false)
2222
throw new
23-
Error(i"""no untyped tree for $tree, pos = ${tree.sourcePos}
23+
Error(i"""no untyped tree for $tree, pos = ${tree.pos}
2424
|best matching path =\n$loosePath%\n====\n%
25-
|path positions = ${loosePath.map(_.sourcePos)}""")
25+
|path positions = ${loosePath.map(_.pos)}""")
2626
}
2727

2828
/** The reverse path of untyped trees starting with a tree that closest matches

compiler/src/dotty/tools/dotc/ast/Positioned.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ abstract class Positioned(implicit @transientParam src: SourceFile) extends Prod
2828
def uniqueId: Int = myUniqueId
2929

3030
def source: SourceFile = SourceFile.fromId(uniqueId)
31-
def sourcePos(implicit ctx: Context): Position = source.atSpan(span)
31+
def pos(implicit ctx: Context): Position = source.atSpan(span)
3232

3333
//setId(initialSource(src).nextId)
3434
setPos(initialSpan(src), source)

compiler/src/dotty/tools/dotc/core/SymbolLoaders.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ object SymbolLoaders {
134134
ctx.warning(i"""$what ${tree.name} is in the wrong directory.
135135
|It was declared to be in package ${path.reverse.mkString(".")}
136136
|But it is found in directory ${filePath.reverse.mkString(File.separator)}""",
137-
tree.sourcePos)
137+
tree.pos)
138138
ok
139139
}
140140

compiler/src/dotty/tools/dotc/core/tasty/TreeUnpickler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -856,7 +856,7 @@ class TreeUnpickler(reader: TastyReader,
856856
goto(end)
857857
setPos(start, tree)
858858
if (!sym.isType) { // Only terms might have leaky aliases, see the documentation of `checkNoPrivateLeaks`
859-
sym.info = ta.avoidPrivateLeaks(sym, tree.sourcePos)
859+
sym.info = ta.avoidPrivateLeaks(sym, tree.pos)
860860
}
861861

862862
sym.defTree = tree

compiler/src/dotty/tools/dotc/printing/PlainPrinter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,7 @@ class PlainPrinter(_ctx: Context) extends Printer {
503503
else
504504
Text()
505505

506-
nodeName ~ "(" ~ elems ~ tpSuffix ~ ")" ~ (Str(tree.sourcePos.toString) provided ctx.settings.YprintPos.value)
506+
nodeName ~ "(" ~ elems ~ tpSuffix ~ ")" ~ (Str(tree.pos.toString) provided ctx.settings.YprintPos.value)
507507
}.close // todo: override in refined printer
508508

509509
def toText(pos: Position): Text = {

compiler/src/dotty/tools/dotc/printing/RefinedPrinter.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
311311
val txt = tree.typeOpt match {
312312
case tp: NamedType if name != nme.WILDCARD =>
313313
val pre = if (tp.symbol is JavaStatic) tp.prefix.widen else tp.prefix
314-
toTextPrefix(pre) ~ withPos(selectionString(tp), tree.sourcePos)
314+
toTextPrefix(pre) ~ withPos(selectionString(tp), tree.pos)
315315
case _ =>
316316
toText(name)
317317
}
@@ -335,8 +335,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
335335
typeApplyText(tree)
336336
case Literal(c) =>
337337
tree.typeOpt match {
338-
case ConstantType(tc) => withPos(toText(tc), tree.sourcePos)
339-
case _ => withPos(toText(c), tree.sourcePos)
338+
case ConstantType(tc) => withPos(toText(tc), tree.pos)
339+
case _ => withPos(toText(c), tree.pos)
340340
}
341341
case New(tpt) =>
342342
keywordStr("new ") ~ {
@@ -501,7 +501,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
501501
case SymbolLit(str) =>
502502
"'" + str
503503
case InterpolatedString(id, segments) =>
504-
def strText(str: Literal) = withPos(escapedString(str.const.stringValue), tree.sourcePos)
504+
def strText(str: Literal) = withPos(escapedString(str.const.stringValue), tree.pos)
505505
def segmentText(segment: Tree) = segment match {
506506
case Thicket(List(str: Literal, expr)) => strText(str) ~ "{" ~ toTextGlobal(expr) ~ "}"
507507
case str: Literal => strText(str)
@@ -603,7 +603,7 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
603603
if (tree.isInstanceOf[MemberDef]) Str(s"${tree.source}${tree.span}")
604604
else Str(s"${tree.source}${tree.span.toSynthetic}")
605605
else
606-
"<" ~ toText(tree.sourcePos) ~ ">"
606+
"<" ~ toText(tree.pos) ~ ">"
607607
val clsStr = ""//if (tree.isType) tree.getClass.toString else ""
608608
txt = (txt ~ "@" ~ posStr ~ clsStr).close
609609
}
@@ -645,8 +645,8 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
645645
if (tree.hasType && tree.symbol.exists) {
646646
val str: Text = nameString(tree.symbol)
647647
tree match {
648-
case tree: RefTree => withPos(str, tree.sourcePos)
649-
case tree: MemberDef => withPos(str, tree.sourcePos.withSpan(tree.nameSpan))
648+
case tree: RefTree => withPos(str, tree.pos)
649+
case tree: MemberDef => withPos(str, tree.pos.withSpan(tree.nameSpan))
650650
case _ => str
651651
}
652652
}

compiler/src/dotty/tools/dotc/sbt/ExtractDependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ private class ExtractDependenciesCollector extends tpd.TreeTraverser { thisTreeT
235235
ctx.warning("""|No class, trait or object is defined in the compilation unit.
236236
|The incremental compiler cannot record the dependency information in such case.
237237
|Some errors like unused import referring to a non-existent class might not be reported.
238-
|""".stripMargin, tree.sourcePos)
238+
|""".stripMargin, tree.pos)
239239
}
240240
_responsibleForImports
241241
}

compiler/src/dotty/tools/dotc/tastyreflect/IdOpsImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import dotty.tools.dotc.core.Decorators._
55
trait IdOpsImpl extends scala.tasty.reflect.IdOps with CoreImpl {
66

77
def IdDeco(id: Id): IdAPI = new IdAPI {
8-
def pos(implicit ctx: Context): Position = id.sourcePos
8+
def pos(implicit ctx: Context): Position = id.pos
99
def name(implicit ctx: Context): String = id.name.toString
1010
}
1111

compiler/src/dotty/tools/dotc/tastyreflect/PatternOpsImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ trait PatternOpsImpl extends scala.tasty.reflect.PatternOps with CoreImpl {
3434
// ----- Patterns -------------------------------------------------
3535

3636
def PatternDeco(pattern: Pattern): PatternAPI = new PatternAPI {
37-
def pos(implicit ctx: Context): Position = pattern.sourcePos
37+
def pos(implicit ctx: Context): Position = pattern.pos
3838
def tpe(implicit ctx: Context): Type = pattern.tpe.stripTypeVar
3939
}
4040

compiler/src/dotty/tools/dotc/tastyreflect/TreeOpsImpl.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import dotty.tools.dotc.tastyreflect.FromSymbol.{definitionFromSym, packageDefFr
1010
trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with CoreImpl with Helpers {
1111

1212
def TreeDeco(tree: Tree): TreeAPI = new TreeAPI {
13-
def pos(implicit ctx: Context): Position = tree.sourcePos
13+
def pos(implicit ctx: Context): Position = tree.pos
1414
def symbol(implicit ctx: Context): Symbol = tree.symbol
1515
}
1616

@@ -353,7 +353,7 @@ trait TreeOpsImpl extends scala.tasty.reflect.TreeOps with CoreImpl with Helpers
353353

354354
def TermDeco(term: Term): TermAPI = new TermAPI {
355355
import tpd._
356-
def pos(implicit ctx: Context): Position = term.sourcePos
356+
def pos(implicit ctx: Context): Position = term.pos
357357
def tpe(implicit ctx: Context): Type = term.tpe
358358
def underlyingArgument(implicit ctx: Context): Term = term.underlyingArgument
359359
def underlying(implicit ctx: Context): Term = term.underlying

compiler/src/dotty/tools/dotc/tastyreflect/TypeOrBoundsTreesOpsImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import dotty.tools.dotc.core.{Contexts, Types}
99
trait TypeOrBoundsTreesOpsImpl extends scala.tasty.reflect.TypeOrBoundsTreeOps with CoreImpl {
1010

1111
def TypeTreeDeco(tpt: TypeTree): TypeTreeAPI = new TypeTreeAPI {
12-
def pos(implicit ctx: Context): Position = tpt.sourcePos
12+
def pos(implicit ctx: Context): Position = tpt.pos
1313
def symbol(implicit ctx: Context): Symbol = tpt.symbol
1414
def tpe(implicit ctx: Context): Type = tpt.tpe.stripTypeVar
1515
}

compiler/src/dotty/tools/dotc/transform/AccessProxies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ abstract class AccessProxies {
143143
def accessorIfNeeded(tree: Tree)(implicit ctx: Context): Tree = tree match {
144144
case tree: RefTree if needsAccessor(tree.symbol) =>
145145
if (tree.symbol.isConstructor) {
146-
ctx.error("Implementation restriction: cannot use private constructors in inlineable methods", tree.sourcePos)
146+
ctx.error("Implementation restriction: cannot use private constructors in inlineable methods", tree.pos)
147147
tree // TODO: create a proper accessor for the private constructor
148148
}
149149
else useAccessor(tree)

compiler/src/dotty/tools/dotc/transform/CheckStatic.scala

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,26 +33,26 @@ class CheckStatic extends MiniPhase {
3333
for(defn <- defns) {
3434
if (defn.symbol.hasAnnotation(ctx.definitions.ScalaStaticAnnot)) {
3535
if(!ctx.owner.is(Module)) {
36-
ctx.error(StaticFieldsOnlyAllowedInObjects(defn.symbol), defn.sourcePos)
36+
ctx.error(StaticFieldsOnlyAllowedInObjects(defn.symbol), defn.pos)
3737
}
3838

3939
if (defn.isInstanceOf[ValDef] && hadNonStaticField) {
40-
ctx.error(StaticFieldsShouldPrecedeNonStatic(defn.symbol, defns), defn.sourcePos)
40+
ctx.error(StaticFieldsShouldPrecedeNonStatic(defn.symbol, defns), defn.pos)
4141
}
4242

4343
val companion = ctx.owner.companionClass
4444
def clashes = companion.asClass.membersNamed(defn.name)
4545

4646
if (!companion.exists) {
47-
ctx.error(MissingCompanionForStatic(defn.symbol), defn.sourcePos)
47+
ctx.error(MissingCompanionForStatic(defn.symbol), defn.pos)
4848
} else if (clashes.exists) {
49-
ctx.error(MemberWithSameNameAsStatic(), defn.sourcePos)
49+
ctx.error(MemberWithSameNameAsStatic(), defn.pos)
5050
} else if (defn.symbol.is(Flags.Mutable) && companion.is(Flags.Trait)) {
51-
ctx.error(TraitCompanionWithMutableStatic(), defn.sourcePos)
51+
ctx.error(TraitCompanionWithMutableStatic(), defn.pos)
5252
} else if (defn.symbol.is(Flags.Lazy)) {
53-
ctx.error(LazyStaticField(), defn.sourcePos)
53+
ctx.error(LazyStaticField(), defn.pos)
5454
} else if (defn.symbol.allOverriddenSymbols.nonEmpty) {
55-
ctx.error(StaticOverridingNonStaticMembers(), defn.sourcePos)
55+
ctx.error(StaticOverridingNonStaticMembers(), defn.pos)
5656
}
5757
} else hadNonStaticField = hadNonStaticField || defn.isInstanceOf[ValDef]
5858

compiler/src/dotty/tools/dotc/transform/Erasure.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ object Erasure {
321321

322322
private def checkNotErased(tree: Tree)(implicit ctx: Context): tree.type = {
323323
if (tree.symbol.isEffectivelyErased && !ctx.mode.is(Mode.Type))
324-
ctx.error(em"${tree.symbol} is declared as erased, but is in fact used", tree.sourcePos)
324+
ctx.error(em"${tree.symbol} is declared as erased, but is in fact used", tree.pos)
325325
tree
326326
}
327327

compiler/src/dotty/tools/dotc/transform/ExpandSAMs.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,15 +161,15 @@ class ExpandSAMs extends MiniPhase {
161161

162162
case _ =>
163163
val found = tpe.baseType(defn.FunctionClass(1))
164-
ctx.error(TypeMismatch(found, tpe), tree.sourcePos)
164+
ctx.error(TypeMismatch(found, tpe), tree.pos)
165165
tree
166166
}
167167
}
168168

169169
private def checkRefinements(tpe: Type, tree: Tree)(implicit ctx: Context): Type = tpe.dealias match {
170170
case RefinedType(parent, name, _) =>
171171
if (name.isTermName && tpe.member(name).symbol.ownersIterator.isEmpty) // if member defined in the refinement
172-
ctx.error("Lambda does not define " + name, tree.sourcePos)
172+
ctx.error("Lambda does not define " + name, tree.pos)
173173
checkRefinements(parent, tree)
174174
case tpe =>
175175
tpe

compiler/src/dotty/tools/dotc/transform/ExplicitOuter.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ class ExplicitOuter extends MiniPhase with InfoTransformer { thisPhase =>
118118
if (tree.tpt ne EmptyTree) {
119119
val cls = tree.tpt.asInstanceOf[TypeTree].tpe.classSymbol
120120
if (cls.exists && hasOuter(cls.asClass))
121-
ctx.error("Not a single abstract method type, requires an outer pointer", tree.sourcePos)
121+
ctx.error("Not a single abstract method type, requires an outer pointer", tree.pos)
122122
}
123123
tree
124124
}

compiler/src/dotty/tools/dotc/transform/MacroTransform.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ abstract class MacroTransform extends Phase {
6363
}
6464
catch {
6565
case ex: TypeError =>
66-
ctx.error(ex.toMessage, tree.sourcePos)
66+
ctx.error(ex.toMessage, tree.pos)
6767
tree
6868
}
6969

compiler/src/dotty/tools/dotc/transform/MegaPhase.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ class MegaPhase(val miniPhases: Array[MiniPhase]) extends Phase {
170170
}
171171
catch {
172172
case ex: TypeError =>
173-
ctx.error(ex.toMessage, tree.sourcePos)
173+
ctx.error(ex.toMessage, tree.pos)
174174
tree
175175
}
176176
def goUnnamed(tree: Tree, start: Int) =
@@ -205,7 +205,7 @@ class MegaPhase(val miniPhases: Array[MiniPhase]) extends Phase {
205205
}
206206
catch {
207207
case ex: TypeError =>
208-
ctx.error(ex.toMessage, tree.sourcePos)
208+
ctx.error(ex.toMessage, tree.pos)
209209
tree
210210
}
211211
if (tree.isInstanceOf[NameTree]) goNamed(tree, start) else goUnnamed(tree, start)

compiler/src/dotty/tools/dotc/transform/PatternMatcher.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ object PatternMatcher {
926926
patmatch.println(i"original types: ${typesInCases(original.cases)}%, %")
927927
patmatch.println(i"switch types : ${typesInCases(resultCases)}%, %")
928928
patmatch.println(i"tree = $result")
929-
ctx.warning(UnableToEmitSwitch(numTypes(original.cases) < MinSwitchCases), original.sourcePos)
929+
ctx.warning(UnableToEmitSwitch(numTypes(original.cases) < MinSwitchCases), original.pos)
930930
}
931931
case _ =>
932932
}

compiler/src/dotty/tools/dotc/transform/PostTyper.scala

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
239239
super.transform(tree1)
240240
}
241241
case Inlined(call, bindings, expansion) if !call.isEmpty =>
242-
val callTrace = Inliner.inlineCallTrace(call.symbol, call.sourcePos)
242+
val callTrace = Inliner.inlineCallTrace(call.symbol, call.pos)
243243
cpy.Inlined(tree)(callTrace, transformSub(bindings), transform(expansion)(inlineContext(call)))
244244
case tree: Template =>
245245
withNoCheckNews(tree.parents.flatMap(newPart)) {
@@ -300,9 +300,9 @@ class PostTyper extends MacroTransform with IdentityDenotTransformer { thisPhase
300300
def checkIdent(ident: untpd.Ident): Unit = {
301301
val name = ident.name.asTermName
302302
if (name != nme.WILDCARD && !exprTpe.member(name).exists && !exprTpe.member(name.toTypeName).exists)
303-
ctx.error(NotAMember(exprTpe, name, "value"), ident.sourcePos)
303+
ctx.error(NotAMember(exprTpe, name, "value"), ident.pos)
304304
if (seen(ident.name))
305-
ctx.error(ImportRenamedTwice(ident), ident.sourcePos)
305+
ctx.error(ImportRenamedTwice(ident), ident.pos)
306306
seen += ident.name
307307
}
308308
selectors.foreach {

compiler/src/dotty/tools/dotc/transform/ProtectedAccessors.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class ProtectedAccessors extends MiniPhase {
6060
val curCls = ctx.owner.enclosingClass
6161
transforms.println(i"${curCls.ownersIterator.toList}%, %")
6262
ctx.error(i"illegal access to protected ${reference.symbol.showLocated} from $curCls",
63-
reference.sourcePos)
63+
reference.pos)
6464
reference
6565
}
6666
}

compiler/src/dotty/tools/dotc/transform/Splicer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ object Splicer {
134134
}
135135

136136
protected def unexpectedTree(tree: Tree)(implicit env: Env): Object =
137-
throw new StopInterpretation("Unexpected tree could not be interpreted: " + tree, tree.sourcePos)
137+
throw new StopInterpretation("Unexpected tree could not be interpreted: " + tree, tree.pos)
138138

139139
private def loadModule(sym: Symbol): Object = {
140140
if (sym.owner.is(Package)) {

0 commit comments

Comments
 (0)