+1
-1
@@ -8,7 +8,7 @@ buildscript {
|
|||||||
extra["defaultSnapshotVersion"] = "1.3-SNAPSHOT"
|
extra["defaultSnapshotVersion"] = "1.3-SNAPSHOT"
|
||||||
val cacheRedirectorEnabled = findProperty("cacheRedirectorEnabled")?.toString()?.toBoolean() == true
|
val cacheRedirectorEnabled = findProperty("cacheRedirectorEnabled")?.toString()?.toBoolean() == true
|
||||||
|
|
||||||
kotlinBootstrapFrom(BootstrapOption.BintrayBootstrap("1.3.70-dev-1806", cacheRedirectorEnabled))
|
kotlinBootstrapFrom(BootstrapOption.BintrayBootstrap("1.3.70-dev-1416", cacheRedirectorEnabled))
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
bootstrapKotlinRepo?.let(::maven)
|
bootstrapKotlinRepo?.let(::maven)
|
||||||
|
|||||||
+2
-17
@@ -638,9 +638,9 @@ class FirDataFlowAnalyzer(private val components: FirAbstractBodyResolveTransfor
|
|||||||
* x.length
|
* x.length
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
val realVariable = getOrCreateRealVariable(variable)
|
|
||||||
requireNotNull(realVariable)
|
|
||||||
variableStorage[initializer]?.takeIf { it.isSynthetic() }?.let { initializerVariable ->
|
variableStorage[initializer]?.takeIf { it.isSynthetic() }?.let { initializerVariable ->
|
||||||
|
val realVariable = getOrCreateRealVariable(variable)
|
||||||
|
requireNotNull(realVariable)
|
||||||
logicSystem.changeVariableForConditionFlow(node.flow, initializerVariable, realVariable)
|
logicSystem.changeVariableForConditionFlow(node.flow, initializerVariable, realVariable)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -648,21 +648,6 @@ class FirDataFlowAnalyzer(private val components: FirAbstractBodyResolveTransfor
|
|||||||
getOrCreateRealVariable(initializer)?.let { rhsVariable ->
|
getOrCreateRealVariable(initializer)?.let { rhsVariable ->
|
||||||
variableStorage.createAliasVariable(variable.symbol, rhsVariable)
|
variableStorage.createAliasVariable(variable.symbol, rhsVariable)
|
||||||
}
|
}
|
||||||
|
|
||||||
getRealVariablesForSafeCallChain(initializer).takeIf { it.isNotEmpty() }?.let {
|
|
||||||
val flow = node.flow
|
|
||||||
for (variableFromSafeCall in it) {
|
|
||||||
logicSystem.addConditionalInfo(
|
|
||||||
flow,
|
|
||||||
variableFromSafeCall,
|
|
||||||
ConditionalFirDataFlowInfo(
|
|
||||||
NotEqNull,
|
|
||||||
realVariable,
|
|
||||||
FirDataFlowInfo(setOf(session.builtinTypes.anyType.coneTypeUnsafe()), emptySet())
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun exitVariableAssignment(assignment: FirVariableAssignment) {
|
fun exitVariableAssignment(assignment: FirVariableAssignment) {
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
interface A {
|
|
||||||
fun foo(): Int
|
|
||||||
|
|
||||||
val x: Int
|
|
||||||
|
|
||||||
fun bar()
|
|
||||||
}
|
|
||||||
|
|
||||||
fun test_1(a: A?) {
|
|
||||||
val x = a?.x
|
|
||||||
if (x != null) {
|
|
||||||
a.bar()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun test_2(a: A?) {
|
|
||||||
val x = a?.foo()
|
|
||||||
if (x != null) {
|
|
||||||
a.bar()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Generated
-5
@@ -118,11 +118,6 @@ public class FirDiagnosticsWithCfgTestGenerated extends AbstractFirDiagnosticsWi
|
|||||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/resolve/testData/resolve/smartcasts"), Pattern.compile("^([^.]+)\\.kt$"), true);
|
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/resolve/testData/resolve/smartcasts"), Pattern.compile("^([^.]+)\\.kt$"), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@TestMetadata("anotherBoundSmartcasts.kt")
|
|
||||||
public void testAnotherBoundSmartcasts() throws Exception {
|
|
||||||
runTest("compiler/fir/resolve/testData/resolve/smartcasts/anotherBoundSmartcasts.kt");
|
|
||||||
}
|
|
||||||
|
|
||||||
@TestMetadata("bangbang.kt")
|
@TestMetadata("bangbang.kt")
|
||||||
public void testBangbang() throws Exception {
|
public void testBangbang() throws Exception {
|
||||||
runTest("compiler/fir/resolve/testData/resolve/smartcasts/bangbang.kt");
|
runTest("compiler/fir/resolve/testData/resolve/smartcasts/bangbang.kt");
|
||||||
|
|||||||
Reference in New Issue
Block a user