Skip to content

Anonymous classes indices should not be global #2964

Closed
@nicolasstucki

Description

@nicolasstucki

Currently fresh names for anonymous classes follow this pattern

class Foo {
  new Object {} // will be named Foo$$anon$1
}
class Bar {
  new Object {} // will be named Bar$$anon$2
  new Object {} // will be named Bar$$anon$3
}
class Baz {
  new Object {} // will be named Baz$$anon$4
}

which will depend on the compilation order.

We need to change it to give fresh names per owner class like:

class Foo {
  new Object {} // will be named Foo$$anon$1
}
class Bar {
  new Object {} // will be named Bar$$anon$1
  new Object {} // will be named Bar$$anon$2
}
class Baz {
  new Object {} // will be named Baz$$anon$1
}

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