Skip to content

Tasty decompiler crash on simple case class #7329

Closed
@bishabosha

Description

@bishabosha

minimized code

This has been introduced since 0.19 release, so only affects master

case class Foo(a: Int)

$ dotc -decompile Foo.tasty

Stack trace
/** Decompiled from ./Foo.tasty */
java.lang.AssertionError: assertion failed while compiling Foo
Exception in thread "main" java.lang.AssertionError: assertion failed
	at dotty.DottyPredef$.assertFail(DottyPredef.scala:16)
	at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.Symbol_tree(ReflectionCompilerInterface.scala:1462)
	at dotty.tools.dotc.tastyreflect.ReflectionCompilerInterface.Symbol_tree(ReflectionCompilerInterface.scala:1461)
	at scala.tasty.reflect.SymbolOps$SymbolAPI.tree(SymbolOps.scala:54)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printParamDef(Printers.scala:1276)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printSeparated$14(Printers.scala:1248)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printArgsDefs$$anonfun$1(Printers.scala:1255)
	at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.inParens(Printers.scala:525)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printArgsDefs(Printers.scala:1256)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printTree(Printers.scala:600)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printTrees$$anonfun$1(Printers.scala:1084)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printSeparated$3(Printers.scala:1075)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printList(Printers.scala:1079)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printTrees(Printers.scala:1084)
	at scala.tasty.reflect.Printers$SourceCodePrinter$Buffer.printTree(Printers.scala:565)
	at scala.tasty.reflect.Printers$SourceCodePrinter.showTree(Printers.scala:460)
	at dotty.tools.dotc.tastyreflect.ReflectionImpl$.showTree(ReflectionImpl.scala:21)
	at dotty.tools.dotc.decompiler.DecompilationPrinter.printToOutput(DecompilationPrinter.scala:46)
	at dotty.tools.dotc.decompiler.DecompilationPrinter.run(DecompilationPrinter.scala:23)
	at dotty.tools.dotc.core.Phases$Phase.runOn$$anonfun$1(Phases.scala:315)
	at scala.collection.immutable.List.map(List.scala:219)
	at dotty.tools.dotc.core.Phases$Phase.runOn(Phases.scala:316)
	at dotty.tools.dotc.Run.runPhases$4$$anonfun$4(Run.scala:159)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:15)
	at dotty.runtime.function.JProcedure1.apply(JProcedure1.java:10)
	at scala.collection.ArrayOps$.foreach$extension(ArrayOps.scala:1323)
	at dotty.tools.dotc.Run.runPhases$5(Run.scala:169)
	at dotty.tools.dotc.Run.compileUnits$$anonfun$1(Run.scala:177)
	at dotty.runtime.function.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:12)
	at dotty.tools.dotc.util.Stats$.maybeMonitored(Stats.scala:67)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:184)
	at dotty.tools.dotc.Run.compileUnits(Run.scala:126)
	at dotty.tools.dotc.fromtasty.TASTYRun.compile(TASTYRun.scala:10)
	at dotty.tools.dotc.Driver.doCompile(Driver.scala:35)
	at dotty.tools.dotc.Driver.process(Driver.scala:178)
	at dotty.tools.dotc.Driver.process(Driver.scala:147)
	at dotty.tools.dotc.Driver.process(Driver.scala:159)
	at dotty.tools.dotc.Driver.main(Driver.scala:186)
	at dotty.tools.dotc.decompiler.Main.main(Main.scala)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions