Added test with overriding Object[] with T[]
EA-43482 - ISE: JavaFunctionResolver.checkFunctionsOverrideCorrectly
This commit is contained in:
@@ -7,13 +7,18 @@ public interface ArraysInSubtypes {
|
||||
interface Super {
|
||||
CharSequence[] array();
|
||||
List<? extends CharSequence[]> listOfArray();
|
||||
|
||||
Object[] objArray();
|
||||
}
|
||||
|
||||
interface Sub extends Super {
|
||||
interface Sub<T> extends Super {
|
||||
@ExpectLoadError("Return type is not a subtype of overridden method. To fix it, add annotation with Kotlin signature to super method with type Array<CharSequence>? replaced with Array<out CharSequence>? in return type")
|
||||
String[] array();
|
||||
|
||||
@ExpectLoadError("Return type is not a subtype of overridden method. To fix it, add annotation with Kotlin signature to super method with type Array<CharSequence>? replaced with Array<out CharSequence>? in return type")
|
||||
List<? extends String[]> listOfArray();
|
||||
|
||||
@ExpectLoadError("Return type is not a subtype of overridden method. To fix it, add annotation with Kotlin signature to super method with type Array<Any>? replaced with Array<out Any>? in return type")
|
||||
T[] objArray();
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,15 @@ package test
|
||||
|
||||
public trait ArraysInSubtypes : java.lang.Object {
|
||||
|
||||
public trait Sub : test.ArraysInSubtypes.Super {
|
||||
public trait Sub</*0*/ T> : test.ArraysInSubtypes.Super {
|
||||
public abstract override /*1*/ fun array() : jet.Array<jet.String>?
|
||||
public abstract override /*1*/ fun listOfArray() : jet.MutableList<out jet.Array<jet.String>?>?
|
||||
public abstract override /*1*/ fun objArray() : jet.Array<T>?
|
||||
}
|
||||
|
||||
public trait Super : java.lang.Object {
|
||||
public abstract fun array() : jet.Array<jet.CharSequence>?
|
||||
public abstract fun listOfArray() : jet.MutableList<out jet.Array<jet.CharSequence>?>?
|
||||
public abstract fun objArray() : jet.Array<jet.Any>?
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user