Skip to content

Bad bytecode generated for a partial function. #2396

Closed
@valdisxp1

Description

@valdisxp1

When running the example below, it fails with java.lang.VerifyError Full stack trace

class Main {
  val buzz = Some(Bees.Bee("buzz")).collect {
    case Bees.Bee(value) => value
  }
}

object Main {
  def main(args: Array[String]): Unit = {
    new Main
  }
}

object Bees {
  case class Bee(value: String)
}

Reproducible in fresh lampepfl/dotty.g8
OpenJDK 8 on Ubuntu

$ java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (build 1.8.0_121-8u121-b13-0ubuntu1.16.04.2-b13)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions