FIR checker: warn unnecessary non-null assertions
This commit is contained in:
committed by
Mikhail Glukhikh
parent
5229d4e4f4
commit
2ecb6733ed
Vendored
-24
@@ -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
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
//KT-4204 ConstraintSystem erased after resolution completion
|
||||
package c
|
||||
|
||||
|
||||
Reference in New Issue
Block a user