Skip to content

Traits in package have an initial method with an illegal method name #577

Closed
@smarter

Description

@smarter
package foo {
  trait Bar
}
% javap -c foo/Bar
Compiled from "tp.scala"
public interface foo.Bar {
  public foo.Bar initial$foo.Bar();
    Code:
       0: aload_0
       1: areturn

Note that the method contains a '.' which is not allowed:

java.lang.ClassFormatError: Illegal method name "initial$foo.Bar" in class foo/Bar

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions