8000 IncompatibleClassChangeError with lambdas in traits under the optimizer · Issue #242 · scala/scala-dev · GitHub
[go: up one dir, main page]

Skip to content
IncompatibleClassChangeError with lambdas in traits under the optimizer #242
Closed
@retronym

Description

@retronym
trait Test {
  def test: Unit = {
    byName("".toString)
    ()
  }

  @inline
  final def byName(action: => Unit) = action
}
qscalac -opt:l:classpath -d /tmp sandbox/test.scala && javap -v -cp /tmp Test | cat -b | grep -i --color  '$anonfun$test$1'
    26    #17 = Utf8               $anonfun$test$1
    27    #18 = NameAndType        #17:#13        // $anonfun$test$1:()V
    28    #19 = Methodref          #2.#18         // Test.$anonfun$test$1:()V
    59    #50 = InterfaceMethodref #2.#18         // Test.$anonfun$test$1:()V
    60    #51 = MethodHandle       #6:#50         // invokestatic Test.$anonfun$test$1:()V
    97           0: invokestatic  #19                 // Method $anonfun$test$1:()V
   141    public static void $anonfun$test$1();
   170        #51 invokestatic Test.$anonfun$test$1:()V

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0