Can not load WeakPairMap$Pair$Weak$1 classfile
See original GitHub issueCompiler version
3.0.0, on Java 11+
Minimized code
def foo: java.lang.WeakPairMap$Pair$Weak$1 = ???
Output
[info] running (fork) dotty.tools.dotc.Main -classpath /Users/linyxus/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/org/scala-lang/scala-library/2.13.5/scala-library-2.13.5.jar:/Users/linyxus/Develop/dotty/library/../out/bootstrap/scala3-library-bootstrapped/scala-3.0.0-RC2/scala3-library_3.0.0-RC2-3.0.0-RC2-bin-SNAPSHOT.jar -color:never issue/weak-pair-map-classfile.scala
error while loading WeakPairMap$Pair$Weak$1,
class file /modules/java.base/java/lang/WeakPairMap$Pair$Weak$1.class is broken, reading aborted with class java.util.NoSuchElementException
key not found: K2
-- [E008] Not Found Error: issue/weak-pair-map-classfile.scala:1:19 ------------------------------------------------------------------------------------------------------------------------------------------
1 |def foo: java.lang.WeakPairMap$Pair$Weak$1 = ???
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| type WeakPairMap$Pair$Weak$1 is not a member of java.lang - did you mean lang.WeakPairMap$Pair$Weak$1?
2 errors found
[error] Nonzero exit code returned from runner: 1
[error] (scala3-compiler / Compile / runMain) Nonzero exit code returned from runner: 1
[error] Total time: 3 s, completed May 26, 2021, 2:36:49 PM
Expectation
The compiler should load the classfile properly.
Issue Analytics
- State:
- Created 2 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
Why am I getting a can't load class, when the class is in my ...
Within it, I'm attempting to connect to a web service, but am getting the error, "Cannot load java type: org.mainco.bsorg.
Read more >Bad Class File Error... What am i doing wrong? — oracle-tech
I have the exact same problem - but unfortunately your solution doesn't work for me, because I believe my class is in the...
Read more >How To Fix Minecraft Error LinkageError occurred ... - YouTube
How To Fix Minecraft: Java Edition Error: LinkageError occurred while loading main class net.minecraft.bundler.Main java.lang.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ah no, I missed the “is broken” part, that shouldn’t happen indeed.
@Linyxus can you add your JVM version to the issue?
From myself I can add that other (?) classfile parses also seem to be having analogous problems: https://github.com/mockk/mockk/issues/130