[NI] Remove outdated intention test according to fixed consistency of OI and NI
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:-NewInference
|
||||
// PROBLEM: none
|
||||
// ERROR: Type mismatch: inferred type is Long? but Long was expected
|
||||
fun test(b: Boolean, x: Long, y: Long?) {
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+NewInference
|
||||
// PROBLEM: Assignment should be lifted out of 'if'
|
||||
// ERROR: None of the following functions can be called with the arguments supplied: <br>public final operator fun plus(other: Byte): Long defined in kotlin.Long<br>public final operator fun plus(other: Double): Double defined in kotlin.Long<br>public final operator fun plus(other: Float): Float defined in kotlin.Long<br>public final operator fun plus(other: Int): Long defined in kotlin.Long<br>public final operator fun plus(other: Long): Long defined in kotlin.Long<br>public final operator fun plus(other: Short): Long defined in kotlin.Long
|
||||
|
||||
fun test(b: Boolean, x: Long, y: Long?) {
|
||||
var num: Long = 0L
|
||||
<caret>if (b) {
|
||||
num += x
|
||||
} else {
|
||||
num += y
|
||||
}
|
||||
}
|
||||
-12
@@ -1,12 +0,0 @@
|
||||
// COMPILER_ARGUMENTS: -XXLanguage:+NewInference
|
||||
// PROBLEM: Assignment should be lifted out of 'if'
|
||||
// ERROR: None of the following functions can be called with the arguments supplied: <br>public final operator fun plus(other: Byte): Long defined in kotlin.Long<br>public final operator fun plus(other: Double): Double defined in kotlin.Long<br>public final operator fun plus(other: Float): Float defined in kotlin.Long<br>public final operator fun plus(other: Int): Long defined in kotlin.Long<br>public final operator fun plus(other: Long): Long defined in kotlin.Long<br>public final operator fun plus(other: Short): Long defined in kotlin.Long
|
||||
|
||||
fun test(b: Boolean, x: Long, y: Long?) {
|
||||
var num: Long = 0L
|
||||
num += if (b) {
|
||||
x
|
||||
} else {
|
||||
y
|
||||
}
|
||||
}
|
||||
-5
@@ -5178,11 +5178,6 @@ public class LocalInspectionTestGenerated extends AbstractLocalInspectionTest {
|
||||
runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/typeMismatch2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeMismatch2_ni.kt")
|
||||
public void testTypeMismatch2_ni() throws Exception {
|
||||
runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/typeMismatch2_ni.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeMismatch3.kt")
|
||||
public void testTypeMismatch3() throws Exception {
|
||||
runTest("idea/testData/inspectionsLocal/liftOut/ifToAssignment/typeMismatch3.kt");
|
||||
|
||||
Reference in New Issue
Block a user