Partial body resolve: fixed bug
This commit is contained in:
@@ -141,7 +141,7 @@ class PartialBodyResolveFilter(elementToResolve: JetElement, private val body: J
|
||||
}
|
||||
}
|
||||
|
||||
condition.acceptChildren(this)
|
||||
condition.accept(this)
|
||||
|
||||
if (thenBranch != null && elseBranch != null) {
|
||||
val thenCasts = potentialSmartCastPlaces(thenBranch, filter)
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
Resolve target: value-parameter val p: kotlin.Boolean? smart-casted to kotlin.Boolean
|
||||
Skipped statements:
|
||||
print(p1!!.hashCode())
|
||||
@@ -0,0 +1,7 @@
|
||||
fun foo(p: Boolean?, p1: Any?) {
|
||||
if (p!!) {
|
||||
print(p1!!.hashCode())
|
||||
}
|
||||
|
||||
<caret>p.hashCode()
|
||||
}
|
||||
@@ -48,6 +48,12 @@ public class PartialBodyResolveTestGenerated extends AbstractPartialBodyResolveT
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("BangBangInIfCondition.kt")
|
||||
public void testBangBangInIfCondition() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/BangBangInIfCondition.kt");
|
||||
doTest(fileName);
|
||||
}
|
||||
|
||||
@TestMetadata("DeclarationsBefore.kt")
|
||||
public void testDeclarationsBefore() throws Exception {
|
||||
String fileName = JetTestUtils.navigationMetadata("idea/testData/resolve/partialBodyResolve/DeclarationsBefore.kt");
|
||||
|
||||
Reference in New Issue
Block a user