-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
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
(2.13.4 -target:11) java.lang.IllegalAccessError: Update to non-static final field ... attempted from a different method than the initializer method <init> #12340
Comments
The bug was originally caught in |
I have this suspicion that this is fixed with scala/scala@d8840a6 that shipped in 2.13.5. Could you check if this is still an issue, please? |
Same with name := "untitled"
version := "0.1"
scalaVersion := "2.13.5"
scalacOptions := Seq(
"-target:11"
) |
JFTR same for |
This seems to be a case that was missed in scala/scala#7028 (discussion on scala/scala-dev#408). The anonymous class |
Is this/are these things that can be backported to 2.12? |
+1 to backport to 2.12 |
Meanwhile you can only |
reproduction steps
using Scala 2.13.4
with JDK 11 (Oracle Corporation Java 11.0.3)
Create simple sbt project with target jvm bytecode level set to
11
Create simple file:
problem
run it e.g. via
sbt runMain Test
see the error:
sbt
last
command doesn't show the stack trace for some reason,so run e.g. with IntelliJ to see the stack trace:
Note that with
-target:8
(default value) no exception occursThe text was updated successfully, but these errors were encountered: