Skip to content

Concrete trait member should take precedence over deferred method #2072

@adriaanm

Description

@adriaanm
trait T { lazy val x: String = "foo" }
abstract class AC extends T { def x: Any }

compiles to:

public abstract class AC implements T {
    public AC() { super.x();   }

    public abstract Object x(); // where did my lazy val go?
}

public interface T {
    default public void $init$() { }

    default public String x() {
        return "foo";
    }
}

See https://issues.scala-lang.org/browse/SI-10223

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