Skip to content

Weird error in REPL: bad constant pool index: 0 #2509

Closed
@pawelprazak

Description

@pawelprazak

Version(s)
1.0.4

Describe the bug
Confusing and unexpected error in simplest REPL command.

To Reproduce

scala-cli
Welcome to Scala 3.3.0 (21, Java OpenJDK 64-Bit Server VM).
Type in expressions for evaluation. Or try :help.

scala> val s = ""
error while loading AccessFlag,
class file /modules/java.base/java/lang/reflect/AccessFlag.class is broken, reading aborted with class java.lang.RuntimeException
bad constant pool index: 0 at pos: 5189
error while loading ElementType,
class file /modules/java.base/java/lang/annotation/ElementType.class is broken, reading aborted with class java.lang.RuntimeException
bad constant pool index: 0 at pos: 1220
2 errors found

Expected behaviour
To not see two errors, or at least get actionable error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions