Supported checking for changing signature in submethods.

#KT-2776 in progress
This commit is contained in:
Evgeny Gerashchenko
2012-11-26 17:25:50 +04:00
parent dd671313c5
commit 8d7de5d063
20 changed files with 295 additions and 6 deletions
@@ -0,0 +1,20 @@
package test;
import org.jetbrains.annotations.NotNull;
import jet.runtime.typeinfo.KotlinSignature;
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
import java.util.*;
public interface ReadOnlyToMutable {
public interface Super {
@KotlinSignature("fun foo(p: List<String>)")
void foo(List<String> p);
}
public interface Sub extends Super {
@ExpectLoadError("Parameter type changed for method which overrides another: MutableList<String>, was: List<String>")
@KotlinSignature("fun foo(p: MutableList<String>)")
void foo(List<String> p);
}
}