From b1c13a25be99bfb630a9769675b77f44b372fc09 Mon Sep 17 00:00:00 2001 From: Evgeny Gerashchenko Date: Mon, 18 Feb 2013 18:57:22 +0400 Subject: [PATCH] Added test with overriding Object[] with T[] EA-43482 - ISE: JavaFunctionResolver.checkFunctionsOverrideCorrectly --- .../loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.java | 7 ++++++- .../loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.txt | 4 +++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.java b/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.java index 17ac585c40c..57cf655adde 100644 --- a/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.java +++ b/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.java @@ -7,13 +7,18 @@ public interface ArraysInSubtypes { interface Super { CharSequence[] array(); List listOfArray(); + + Object[] objArray(); } - interface Sub extends Super { + interface Sub 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? replaced with Array? 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? replaced with Array? in return type") List 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? replaced with Array? in return type") + T[] objArray(); } } \ No newline at end of file diff --git a/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.txt b/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.txt index a1155fc1603..ad0eea66274 100644 --- a/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.txt +++ b/compiler/testData/loadJavaCustom/arraysInSubtypes/ArraysInSubtypes.txt @@ -2,13 +2,15 @@ package test public trait ArraysInSubtypes : java.lang.Object { - public trait Sub : test.ArraysInSubtypes.Super { + public trait Sub : test.ArraysInSubtypes.Super { public abstract override /*1*/ fun array() : jet.Array? public abstract override /*1*/ fun listOfArray() : jet.MutableList?>? + public abstract override /*1*/ fun objArray() : jet.Array? } public trait Super : java.lang.Object { public abstract fun array() : jet.Array? public abstract fun listOfArray() : jet.MutableList?>? + public abstract fun objArray() : jet.Array? } }