Supported simplest case of signatures propagation in value parameter position.
#KT-2776 in progress
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public interface InheritNullability {
|
||||
|
||||
public interface Super {
|
||||
void foo(@NotNull String p);
|
||||
}
|
||||
|
||||
public interface Sub extends Super {
|
||||
void foo(String p);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
public trait InheritNullability: Object {
|
||||
|
||||
public trait Super: Object {
|
||||
public fun foo(p0: String)
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
override fun foo(p0: String)
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public abstract trait test.InheritNullability : java.lang.Object {
|
||||
public abstract trait test.InheritNullability.Sub : test.InheritNullability.Super {
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: jet.String): jet.Tuple0
|
||||
}
|
||||
public abstract trait test.InheritNullability.Super : java.lang.Object {
|
||||
public abstract fun foo(/*0*/ p0: jet.String): jet.Tuple0
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public interface NotNullToNullable {
|
||||
|
||||
public interface Super {
|
||||
void foo(@NotNull String p);
|
||||
}
|
||||
|
||||
public interface Sub extends Super {
|
||||
@ExpectLoadError("Auto type 'jet.String' is not-null, while type in alternative signature is nullable: 'String?'")
|
||||
@KotlinSignature("fun foo(p: String?)")
|
||||
void foo(String p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
public trait NotNullToNullable: Object {
|
||||
|
||||
public trait Super: Object {
|
||||
public fun foo(p0: String)
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
override fun foo(p0: String)
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public abstract trait test.NotNullToNullable : java.lang.Object {
|
||||
public abstract trait test.NotNullToNullable.Sub : test.NotNullToNullable.Super {
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: jet.String): jet.Tuple0
|
||||
}
|
||||
public abstract trait test.NotNullToNullable.Super : java.lang.Object {
|
||||
public abstract fun foo(/*0*/ p0: jet.String): jet.Tuple0
|
||||
}
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package test;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import jet.runtime.typeinfo.KotlinSignature;
|
||||
import org.jetbrains.jet.jvm.compiler.annotation.ExpectLoadError;
|
||||
|
||||
public interface NullableToNotNull {
|
||||
|
||||
public interface Super {
|
||||
void foo(String p);
|
||||
}
|
||||
|
||||
public interface Sub extends Super {
|
||||
@ExpectLoadError("In superclass type is nullable: [String?], in subclass it is not: String")
|
||||
void foo(@NotNull String p);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package test
|
||||
|
||||
public trait NullableToNotNull: Object {
|
||||
|
||||
public trait Super: Object {
|
||||
public fun foo(p0: String?)
|
||||
}
|
||||
|
||||
public trait Sub: Super {
|
||||
override fun foo(p0: String?)
|
||||
}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
namespace test
|
||||
|
||||
public abstract trait test.NullableToNotNull : java.lang.Object {
|
||||
public abstract trait test.NullableToNotNull.Sub : test.NullableToNotNull.Super {
|
||||
public abstract override /*1*/ fun foo(/*0*/ p0: jet.String?): jet.Tuple0
|
||||
}
|
||||
public abstract trait test.NullableToNotNull.Super : java.lang.Object {
|
||||
public abstract fun foo(/*0*/ p0: jet.String?): jet.Tuple0
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user