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 8ed6b59 commit e7f44c9Copy full SHA for e7f44c9
compiler/src/dotty/tools/dotc/core/classfile/ClassfileParser.scala
@@ -917,8 +917,13 @@ class ClassfileParser(
917
}
918
case _ =>
919
if (classfile.jpath == null) {
920
- report.error("Could not load TASTY from .tasty for virtual file " + classfile)
921
- Array.empty
+ val tastyFileOrNull = classfile.container
+ .lookupName(classfile.name.stripSuffix(".class") + ".tasty")
922
+ if (tastyFileOrNull == null) {
923
+ report.error("Could not load TASTY from .tasty for virtual file " + classfile)
924
+ Array.empty
925
+ } else
926
+ tastyFileOrNull.toByteArray
927
} else {
928
val plainFile = new PlainFile(io.File(classfile.jpath).changeExtension("tasty"))
929
if (plainFile.exists) plainFile.toByteArray
0 commit comments