Properly handle @NotNull for arrays

This commit is contained in:
Andrey Breslav
2013-10-30 15:57:30 +04:00
parent 3f3030ff26
commit 31d4993406
8 changed files with 50 additions and 2 deletions
@@ -0,0 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
public class NotNullIntArray {
@NotNull
public int[] hi() { return null; }
}
@@ -0,0 +1,5 @@
package test
public open class NotNullIntArray() : java.lang.Object() {
public open fun hi(): IntArray = throw Exception()
}
@@ -0,0 +1,6 @@
package test
public open class NotNullIntArray : java.lang.Object {
public constructor NotNullIntArray()
public open fun hi(): jet.IntArray
}
@@ -0,0 +1,8 @@
package test;
import org.jetbrains.annotations.NotNull;
public class NotNullObjectArray {
@NotNull
public Object[] hi() { return null; }
}
@@ -0,0 +1,5 @@
package test
public open class NotNullObjectArray() : java.lang.Object() {
public open fun hi(): Array<Any> = throw Exception()
}
@@ -0,0 +1,6 @@
package test
public open class NotNullObjectArray : java.lang.Object {
public constructor NotNullObjectArray()
public open fun hi(): jet.Array<jet.Any>
}
@@ -2423,11 +2423,21 @@ public class LazyResolveRecursiveComparingTestGenerated extends AbstractLazyReso
doTestNotCheckingPrimaryConstructors("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullField.kt");
}
@TestMetadata("NotNullIntArray.kt")
public void testNotNullIntArray() throws Exception {
doTestNotCheckingPrimaryConstructors("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullIntArray.kt");
}
@TestMetadata("NotNullMethod.kt")
public void testNotNullMethod() throws Exception {
doTestNotCheckingPrimaryConstructors("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullMethod.kt");
}
@TestMetadata("NotNullObjectArray.kt")
public void testNotNullObjectArray() throws Exception {
doTestNotCheckingPrimaryConstructors("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullObjectArray.kt");
}
@TestMetadata("NotNullParameter.kt")
public void testNotNullParameter() throws Exception {
doTestNotCheckingPrimaryConstructors("compiler/testData/loadJava/compiledJavaCompareWithKotlin/notNull/NotNullParameter.kt");