eclipse-archived / ceylon

The Ceylon compiler, language module, and command line tools
http://ceylon-lang.org
Apache License 2.0
399 stars 62 forks source link

Backend error using interface to define method refined in intervening interface #2092

Open CeylonMigrationBot opened 9 years ago

CeylonMigrationBot commented 9 years ago

[@jvasileff] This is easiest described by example. AFAICT, all of the elements in the code below are necessary to trigger the bug.

interface I<out Element> {
    shared formal
    I<Result> map<Result>(Result collecting(Element element));
}

interface J<out Element> of K satisfies I<Element> {
    shared formal actual
    J<Result> map<Result>(Result collecting(Element element));
}

interface K of k satisfies J<Nothing> {
    shared actual
    K map<Result>(Result collecting(Nothing element)) => this;
}

object k satisfies K {}

results in:

// k_ is not abstract and does not override abstract method <Result>map(com.redhat.ceylon.compiler.java.runtime.model.TypeDescriptor,ceylon.language.Callable<? extends Result>) in sandbox.ceylon.snap.base.K

[Migrated from ceylon/ceylon-compiler#2092]

CeylonMigrationBot commented 9 years ago

[@FroMage] Let's move it to 1.3