Skip to content

JVM crash: java.lang.VerifyError: Bad type on operand stack #14164

Closed
@strelec

Description

@strelec

Compiler version

3.1.0

Minimized code

It seems that a combination of two factors trigger this bug:

  1. skipping a parameter via named parameters
  2. using for comprehension / lambda
class Base(a: String = "x", param: String = "")

class Child extends Base(param = {
  (for(x <- Seq("a")) yield x)
  "param"
})

new Child

Output

java.lang.VerifyError: Bad type on operand stack
Exception Details:
  Location:
    Playground$Child.<init>()V @25: invokedynamic
  Reason:
    Type uninitializedThis (current frame, stack[1]) is not assignable to 'Playground$Child'

Looks somewhat siliar to #2163

Expectation

Code runs with no output.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions