Redundant nullable return type: fix false positive with non-local return

#KT-41800 Fixed
This commit is contained in:
Toshiaki Kameyama
2020-09-11 09:50:57 +09:00
committed by Vladimir Dolzhenko
parent 349cad7b9a
commit de3907e8cc
5 changed files with 40 additions and 4 deletions
@@ -8249,6 +8249,16 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
runTest("idea/testData/inspectionsLocal/redundantNullableReturnType/function/overridable.kt");
}
@TestMetadata("returnNullableFromLambdaInBlockBody.kt")
public void testReturnNullableFromLambdaInBlockBody() throws Exception {
runTest("idea/testData/inspectionsLocal/redundantNullableReturnType/function/returnNullableFromLambdaInBlockBody.kt");
}
@TestMetadata("returnNullableFromLambdaInSingleExpressionBody.kt")
public void testReturnNullableFromLambdaInSingleExpressionBody() throws Exception {
runTest("idea/testData/inspectionsLocal/redundantNullableReturnType/function/returnNullableFromLambdaInSingleExpressionBody.kt");
}
@TestMetadata("singleExpressionBody.kt")
public void testSingleExpressionBody() throws Exception {
runTest("idea/testData/inspectionsLocal/redundantNullableReturnType/function/singleExpressionBody.kt");
@@ -8287,6 +8297,11 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
runTest("idea/testData/inspectionsLocal/redundantNullableReturnType/property/initializer.kt");
}
@TestMetadata("returnNullableFromLambdaInGetter.kt")
public void testReturnNullableFromLambdaInGetter() throws Exception {
runTest("idea/testData/inspectionsLocal/redundantNullableReturnType/property/returnNullableFromLambdaInGetter.kt");
}
@TestMetadata("var.kt")
public void testVar() throws Exception {
runTest("idea/testData/inspectionsLocal/redundantNullableReturnType/property/var.kt");