Skip to content

Missing position while compiling case classes from tasty #3490

Closed
@nicolasstucki

Description

@nicolasstucki

When compiling from tasty (tests in tests/posFromTasty/)

package foo
case class Foo()

When recompiling the code loaded from tasty there is position missing on the desugared apply method

java.lang.AssertionError: assertion failed: position not set for DefDef(apply,List(),List(List()),TypeTree[TypeRef(ThisType(TypeRef(NoPrefix,module class lang)),Object)],Apply(Select(This(Ident(Foo$)),apply),List())) # 10081
	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:1705)
	at dotty.tools.dotc.reporting.trace$.apply(trace.scala:23)
	at dotty.tools.dotc.typer.Typer.typed(Typer.scala:1702)
	at dotty.tools.dotc.typer.Typer.traverse$1(Typer.scala:1728)
	at dotty.tools.dotc.typer.Typer.typedStats(Typer.scala:1751)
	at dotty.tools.dotc.transform.Erasure$Typer.typedStats(Erasure.scala:662)
	at dotty.tools.dotc.typer.Typer.$anonfun$typedClassDef$1(Typer.scala:1415)
...

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions