Skip to content

Dotty sometimes generates method names with spaces in them for partial functions #3480

Closed
@smarter

Description

@smarter
class Test {
  def foo(x: PartialFunction[Int, Int]) = x(0)

  foo({ case i => i})
}
% javap Test
Compiled from "pfi.scala"
public class Test {
  public Test();
  public int foo(scala.PartialFunction<java.lang.Object, java.lang.Object>);
  public static int Test$$local Test$$$$init$$$anonfun$1$1(int);
  public static boolean Test$$local Test$$$isDefinedAt$1(int);
}

@odersky Do you understand what's going on here?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions