Absence of type is not enough for concluding function has type inference
This commit is contained in:
@@ -65,7 +65,7 @@ public final class JetModifiableBlockHelper {
|
|||||||
if (declaration != null) {
|
if (declaration != null) {
|
||||||
if (declaration instanceof JetNamedFunction) {
|
if (declaration instanceof JetNamedFunction) {
|
||||||
JetNamedFunction function = (JetNamedFunction) declaration;
|
JetNamedFunction function = (JetNamedFunction) declaration;
|
||||||
if (!function.hasDeclaredReturnType()) {
|
if (!function.hasDeclaredReturnType() && !function.hasBlockBody()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
// FALSE
|
||||||
|
fun test() {
|
||||||
|
fun hello() {
|
||||||
|
<caret>
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -46,6 +46,10 @@ public class OutOfBlockModificationTest extends LightCodeInsightFixtureTestCase
|
|||||||
doTest();
|
doTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testInFunInFunWithBody() {
|
||||||
|
doTest();
|
||||||
|
}
|
||||||
|
|
||||||
public void testInFunWithInference() {
|
public void testInFunWithInference() {
|
||||||
doTest();
|
doTest();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user