Skip to content

Reenable class shadowing #4361

Closed
Closed
@Blaisorblade

Description

@Blaisorblade

Rumor is, Martin wants it re-enabled, and we probably should at least under Scala2 mode — and then, why not in Dotty proper: scala/bug#8353 (comment)

@nafg proposed on Gitter maybe we should restrict it to use cases with an unsurprising semantics, where the shadowing class in fact overrides the superclass, such as:

trait Core {
  class Status
}
trait Ext extends Core {
  class Status extends super.Status
}

Class shadowing, in contrast, is more surprising.

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