You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(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
[error] (run-main-12) java.lang.IllegalAccessError: Error running public static void Test.main(java.lang.String[]).
[error] java.lang.IllegalAccessError: Update to non-static final field Test$$anon$1.param$1 attempted from a different method (Test$T$1$_setter_$param$1_$eq) than the initializer method <init>
[error] If using a layered classloader, this can occur if jvm package private classes are accessed across layers. This can be fixed by changing to the Flat or ScalaInstance class loader layering strategies.
[error] java.lang.IllegalAccessError: Error running public static void Test.main(java.lang.String[]).
sbt last command doesn't show the stack trace for some reason,
so run e.g. with IntelliJ to see the stack trace:
Exception in thread "main" java.lang.IllegalAccessError: Update to non-static final field Test$$anon$1.param$1 attempted from a different method (Test$T$1$_setter_$param$1_$eq) than the initializer method <init>
at Test$$anon$1.Test$T$1$_setter_$param$1_$eq(Test.scala:11)
at Test$T$1.$init$(Test.scala:5)
at Test$$anon$1.<init>(Test.scala:11)
at Test$.foo(Test.scala:11)
at Test$.main(Test.scala:3)
at Test.main(Test.scala)
Note that with -target:8 (default value) no exception occurs