FIR checker: warn unnecessary non-null assertions

This commit is contained in:
Jinseong Jeon
2021-04-01 11:44:47 -07:00
committed by Mikhail Glukhikh
parent 5229d4e4f4
commit 2ecb6733ed
72 changed files with 268 additions and 246 deletions
@@ -1,24 +0,0 @@
//KT-4204 ConstraintSystem erased after resolution completion
package c
public abstract class TestBug1() {
public fun m3(position: Int) {
position(m1().second!!)
}
public fun m4(position: (Int)->Int) {
position(m1().second)
}
<!INCOMPATIBLE_MODIFIERS!>private<!> <!INCOMPATIBLE_MODIFIERS!>abstract<!> fun m1(): Pair<Int, Int>
private fun position(p: Int) {}
}
//from library
public class Pair<out A, out B> (
public val first: A,
public val second: B
)
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
//KT-4204 ConstraintSystem erased after resolution completion
package c