Report errors when iterator() returns a nullable type
This commit is contained in:
@@ -15,15 +15,12 @@
|
||||
*/
|
||||
package org.jetbrains.jet.checkers;
|
||||
|
||||
import junit.framework.Assert;
|
||||
import junit.framework.Test;
|
||||
import junit.framework.TestSuite;
|
||||
|
||||
import java.io.File;
|
||||
import org.jetbrains.jet.JetTestUtils;
|
||||
import org.jetbrains.jet.test.TestMetadata;
|
||||
|
||||
import org.jetbrains.jet.checkers.AbstractDiagnosticsTestWithEagerResolve;
|
||||
import java.io.File;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.jet.checkers.AbstractDiagnosticsTestWithEagerResolve}. DO NOT MODIFY MANUALLY */
|
||||
public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEagerResolve {
|
||||
@@ -879,6 +876,11 @@ public class JetDiagnosticsTestGenerated extends AbstractDiagnosticsTestWithEage
|
||||
doTest("compiler/testData/diagnostics/tests/controlStructures/forLoopWithNullableRange.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("forWithNullableIterator.kt")
|
||||
public void testForWithNullableIterator() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/controlStructures/forWithNullableIterator.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("ForWithoutBraces.kt")
|
||||
public void testForWithoutBraces() throws Exception {
|
||||
doTest("compiler/testData/diagnostics/tests/controlStructures/ForWithoutBraces.kt");
|
||||
|
||||
@@ -312,7 +312,7 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testKt903() throws Exception {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
|
||||
blackBoxFile("regressions/kt903.jet");
|
||||
}
|
||||
|
||||
@@ -403,7 +403,7 @@ public class ClassGenTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testKt1980() {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
|
||||
blackBoxFile("regressions/kt1980.kt");
|
||||
}
|
||||
|
||||
|
||||
@@ -108,7 +108,7 @@ public class ControlStructuresTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testFor() throws Exception {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
|
||||
loadFile();
|
||||
// System.out.println(generateToText());
|
||||
final Method main = generateFunction();
|
||||
@@ -117,7 +117,7 @@ public class ControlStructuresTest extends CodegenTestCase {
|
||||
}
|
||||
|
||||
public void testIfBlock() throws Exception {
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
|
||||
loadFile();
|
||||
// System.out.println(generateToText());
|
||||
final Method main = generateFunction();
|
||||
|
||||
@@ -22,7 +22,7 @@ public class SafeRefTest extends CodegenTestCase {
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_ONLY);
|
||||
createEnvironmentWithMockJdkAndIdeaAnnotations(ConfigurationKind.JDK_AND_ANNOTATIONS);
|
||||
}
|
||||
|
||||
public void test247 () throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user