[FIR] Fix for CanBeReplacedWithOperatorAssignment Checker
This commit is contained in:
+4
@@ -0,0 +1,4 @@
|
||||
fun foo(something: Boolean) {
|
||||
var res = false
|
||||
res = res and something
|
||||
}
|
||||
+5
@@ -0,0 +1,5 @@
|
||||
FILE: logicOperators.kt
|
||||
public final fun foo(something: R|kotlin/Boolean|): R|kotlin/Unit| {
|
||||
lvar res: R|kotlin/Boolean| = Boolean(false)
|
||||
R|<local>/res| = R|<local>/res|.R|kotlin/Boolean.and|(R|<local>/something|)
|
||||
}
|
||||
Generated
+5
@@ -115,6 +115,11 @@ public class ExtendedFirDiagnosticsTestGenerated extends AbstractExtendedFirDiag
|
||||
runTest("compiler/fir/analysis-tests/testData/extendedCheckers/canBeReplacedWithOperatorAssignment/list.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("logicOperators.kt")
|
||||
public void testLogicOperators() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/extendedCheckers/canBeReplacedWithOperatorAssignment/logicOperators.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("multipleOperators.kt")
|
||||
public void testMultipleOperators() throws Exception {
|
||||
runTest("compiler/fir/analysis-tests/testData/extendedCheckers/canBeReplacedWithOperatorAssignment/multipleOperators.kt");
|
||||
|
||||
Reference in New Issue
Block a user