Skip to content

Cannot load .tasty files from jar #3549

Closed
@nicolasstucki

Description

@nicolasstucki

When trying to load a .tasty file fro a jar produced with -YemitTasty, the FileZipArchive#LeakyEntry for the .class returns a null java path (AbstractFile.jpath) which ends with a NPE.

echo "class Foo" > Foo.scala
sbt "dotc -d foo.jar -YemitTasty Foo.scala"
sbt "dotc -decompile -classpath foo.jar Foo"

Putting an assert(classfile.jpath ne null, classfile) just before
https://github.com/lampepfl/dotty/blob/master/compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala#L786 makes it explicit.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions