Skip to content

AssertionError: position not set with inline code #3651

Closed
@allanrenucci

Description

@allanrenucci

In #3612, I moved a neg that wasn't run to pending because it crashes the compiler:

> dotc -d out tests/pending/neg/inlineAccess/C_1.scala
> dotc -d out -classpath out tests/pending/neg/inlineAccess/Test_2.scala
exception occurred while typechecking tests/pending/neg/inlineAccess/Test_2.scala
exception occurred while compiling tests/pending/neg/inlineAccess/Test_2.scala
Exception in thread "main" java.lang.AssertionError: assertion failed: position not set for Apply(Select(New(Ident(D)),<init>),List()) # 106
	at scala.Predef$.assert(Predef.scala:219)
	at dotty.tools.dotc.typer.Typer$.assertPositioned(Typer.scala:63)
	at dotty.tools.dotc.typer.Typer.$anonfun$typed$2(Typer.scala:1743)
	at dotty.tools.dotc.reporting.trace$.apply(trace.scala:23)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1740)
	at dotty.tools.dotc.typer.Typer.typedExpr(Typer.scala:1801)
	at dotty.tools.dotc.typer.Typer.$anonfun$typedValDef$1(Typer.scala:1300)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)
	at dotty.tools.dotc.typer.Typer.typedValDef(Typer.scala:1294)
	at dotty.tools.dotc.typer.Typer.typedNamed$1(Typer.scala:1663)
	at dotty.tools.dotc.typer.Typer.typedUnadapted(Typer.scala:1726)
	at dotty.tools.dotc.typer.ReTyper.typedUnadapted(ReTyper.scala:94)
	at dotty.tools.dotc.typer.Typer.$anonfun$typed$2(Typer.scala:1744)
	at dotty.tools.dotc.reporting.trace$.apply(trace.scala:23)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1740)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1766)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1789)
	at dotty.tools.dotc.typer.Typer.typedBlockStats(Typer.scala:623)
	at dotty.tools.dotc.typer.Typer.$anonfun$typedBlock$1(Typer.scala:626)
	at dotty.tools.dotc.util.Stats$.track(Stats.scala:35)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions