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.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import annotation.static class T object T { @static lazy val x = "hi" def main(args: Array[String]): Unit = { println(x) } }
gives
java.lang.VerifyError: Bad local variable type Exception Details: Location: T$.x()Ljava/lang/String; @0: aload_0 Reason: Type top (current frame, locals[0]) is not assignable to reference type Current Frame: bci: @0 flags: { } locals: { } stack: { } Bytecode: 0x0000000: 2ab4 0018 9a00 06a7 000a 2ab4 001a a700 0x0000010: 122a 04b5 0018 2a12 1cb5 001a 2ab4 001a 0x0000020: b0 Stackmap Table: same_frame(@10) same_frame(@17) same_locals_1_stack_item_frame(@32,Object[#30]) at T.main(Test.scala)
The text was updated successfully, but these errors were encountered:
Fixed by disallowing @static lazy vals. #1226
@static
Sorry, something went wrong.
No branches or pull requests
gives
The text was updated successfully, but these errors were encountered: