Skip to content

Scala 2.12 support: trait compiles to an interface #168

@eed3si9n

Description

@eed3si9n

In most cases when a class inherits a concrete method from a trait we
don't need to generate a forwarder to the default method in the class.

This means we could skip the invalidation of classes extending traits in most cases.

notes

scala/scala#5085 (comment)

after this patch there are two situations where a trait forwarder is emitted:

  1. a class inherits the same method from two traits, and the two traits are not in a inheritance relationship.
  2. a class inherits a concrete method from a trait, and the same method also exists (abstract or concrete) in a superclass.

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