Skip to content

Anonymous methods indices should not be global #3006

Closed
@nicolasstucki

Description

@nicolasstucki
class Foo {
  def foo() = {
    def f() = ()
    f()
  }
}
class Bar {
  def foo() = {
    def f() = ()
    f()
  }
}

will have the f lifted as f$1 and f$2, but they should be both f$1 as they are in different classes. Currently, the result of the code depends on the compilation order.

This is a follow-up of #2964.

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