"VerifyError: Bad type on operand stack" when Class with var
extends class with lambda
#13630
Labels
Milestone
var
extends class with lambda
#13630
It seems that when we have a class with a
var
as a member that extends a class that has a lambda as a member the class is not instantiable at runtime.I check current reported bugs and this is not like any of the others already reported for "Bad type on operand stack".
Compiler version
3.0.2
and3.1.0-RC2
Minimized code
This code compiles in Scala 3 and in Scala 2. You can find a reproducer here
Output
When we run the previous code in Scala 3.x we get the following output.
Expectation
Code should run in Scala 3 (3.0.2 and 3.1.0-RC2) as it runs in Scala 2.
Notes
Please note that the following does compile and run in Scala 3.x and 2.13.
The text was updated successfully, but these errors were encountered: