Skip to content

Commit f708ee6

Browse files
committed
Fix rebase breakage
1 parent 5f53757 commit f708ee6

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ object desugar {
829829
case Some(DefDef(name, _, (vparam :: _) :: _, _, _)) =>
830830
s"${name}_of_${inventTypeName(vparam.tpt)}"
831831
case _ =>
832-
ctx.error(i"anonymous instance must have `for` part or must define at least one extension method", impl.pos)
832+
ctx.error(i"anonymous instance must have `for` part or must define at least one extension method", impl.sourcePos)
833833
nme.ERROR.toString
834834
}
835835
else
@@ -1015,7 +1015,7 @@ object desugar {
10151015
* def $anonfun(params) = body
10161016
* Closure($anonfun)
10171017
*/
1018-
def makeClosure(params: List[ValDef], body: Tree, tpt: Tree = TypeTree(), isContextual: Boolean)(implicit ctx: Context): Block = {
1018+
def makeClosure(params: List[ValDef], body: Tree, tpt: Tree = null, isContextual: Boolean)(implicit ctx: Context): Block = {
10191019
val span = params.headOption.fold(body.span)(_.span.union(body.span))
10201020
Block(
10211021
DefDef(nme.ANON_FUN, Nil, params :: Nil, if (tpt == null) TypeTree() else tpt, body)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ object untpd extends Trees.Instance[Untyped] with UntypedTreeInfo {
106106
case class PatDef(mods: Modifiers, pats: List[Tree], tpt: Tree, rhs: Tree)(implicit @constructorOnly src: SourceFile) extends DefTree
107107
case class DependentTypeTree(tp: List[Symbol] => Type)(implicit @constructorOnly src: SourceFile) extends Tree
108108

109-
@sharable object EmptyTypeIdent extends Ident(tpnme.EMPTY) with WithoutTypeOrPos[Untyped] {
109+
@sharable object EmptyTypeIdent extends Ident(tpnme.EMPTY)(NoSource) with WithoutTypeOrPos[Untyped] {
110110
override def isEmpty: Boolean = true
111111
}
112112

compiler/src/dotty/tools/dotc/parsing/Parsers.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2546,7 +2546,7 @@ object Parsers {
25462546
* | id ‘=’ Expr
25472547
* InstanceParams ::= [DefTypeParamClause] {‘with’ ‘(’ [DefParams] ‘)}
25482548
*/
2549-
def instanceDef(start: Offset, mods: Modifiers, instanceMod: Mod) = atPos(start, nameStart) {
2549+
def instanceDef(start: Offset, mods: Modifiers, instanceMod: Mod) = atSpan(start, nameStart) {
25502550
val name = if (isIdent && !isIdent(nme.of)) ident() else EmptyTermName
25512551
val tparams = typeParamClauseOpt(ParamOwner.Def)
25522552
val vparamss = paramClauses(ofInstance = true)

0 commit comments

Comments
 (0)