Loading functions from superclasses before current to avoid heisenbug.

Added test with two supertypes.

 #KT-2776 in progress
This commit is contained in:
Evgeny Gerashchenko
2012-11-02 21:10:00 +04:00
parent 494345ce10
commit e2d213f1fd
4 changed files with 45 additions and 2 deletions
@@ -0,0 +1,22 @@
package test;
import org.jetbrains.annotations.NotNull;
import java.util.List;
import jet.runtime.typeinfo.KotlinSignature;
public interface TwoSuperclassesInconsistentGenericTypes {
@KotlinSignature("fun foo(): MutableList<String?>")
List<String> foo();
public interface Other {
@KotlinSignature("fun foo(): MutableList<String>?")
List<String> foo();
}
public class Sub implements TwoSuperclassesInconsistentGenericTypes, Other {
public List<String> foo() {
throw new UnsupportedOperationException();
}
}
}
@@ -0,0 +1,12 @@
namespace test
public abstract trait test.TwoSuperclassesInconsistentGenericTypes : java.lang.Object {
public abstract fun foo(): jet.MutableList<jet.String?>
public abstract trait test.TwoSuperclassesInconsistentGenericTypes.Other : java.lang.Object {
public abstract fun foo(): jet.MutableList<jet.String>?
}
public open class test.TwoSuperclassesInconsistentGenericTypes.Sub : test.TwoSuperclassesInconsistentGenericTypes, test.TwoSuperclassesInconsistentGenericTypes.Other {
public final /*constructor*/ fun <init>(): test.TwoSuperclassesInconsistentGenericTypes.Sub
public open override /*2*/ fun foo(): jet.MutableList<jet.String?>
}
}