We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bf465c1 commit 16752dfCopy full SHA for 16752df
compiler/src/dotty/tools/dotc/typer/Typer.scala
@@ -1563,7 +1563,7 @@ class Typer extends Namer
1563
1564
def checkThisConstrCall(tree: Tree): Unit = tree match {
1565
case app: Apply if untpd.isSelfConstrCall(app) =>
1566
- if (sym.span.start <= app.symbol.span.start)
+ if (sym.span.exists && app.symbol.span.exists && sym.span.start <= app.symbol.span.start)
1567
ctx.error("secondary constructor must call a preceding constructor", app.sourcePos)
1568
case Block(call :: _, _) => checkThisConstrCall(call)
1569
case _ =>
0 commit comments