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
packagerepro// this needs to be in a separate file, if placed in the same file then everything worksextension (src: String) {
// a new anonymous class is essential, it works as expected if this is just a constructor calltransparentinlinedefintoViaRepro=newTestClass(src) {}
}
[info] exception occurred while compiling ducktape/repro/src/main/scala/Repro.scala, ducktape/repro/src/main/scala/syntax.scala
java.lang.AssertionError: assertion failed: private value value in objectRepro in ducktape/repro/src/main/scala/Repro.scala accessed from constructor $anon in ducktape/repro/src/main/scala/syntax.scala while compiling ducktape/repro/src/main/scala/Repro.scala, ducktape/repro/src/main/scala/syntax.scala
I've stumbled upon this error when compiling ducktape with Scala 3.2.0, the file that fails is located here, the class which needs a new anonymus instance here and the extension definition here.
The text was updated successfully, but these errors were encountered:
nicolasstucki
changed the title
Cannot call an inline method that references a field from an anonymous class created with a transparent inline extension in 3.2.0
Cannot call an inline method that references a field from an anonymous class created with a transparent inline
Jan 23, 2023
Compiler version
3.2.0
,3.2.2-RC1-bin-20220909-eaa2889-NIGHTLY
Minimized code
Output
Expectation
The code compiles as it did in
3.1.3
.This can be worked around by doing this:
Context
I've stumbled upon this error when compiling ducktape with
Scala 3.2.0
, the file that fails is located here, the class which needs a new anonymus instance here and the extension definition here.The text was updated successfully, but these errors were encountered: