FIR: apply minor test data fixes around type mismatch problems
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
FILE: treeSet.kt
|
||||
public final val x: R|java/util/SortedSet<kotlin/Int>| = R|java/util/TreeSet.TreeSet|<R|kotlin/Any?|>()
|
||||
public final val x: R|java/util/SortedSet<kotlin/Int>| = R|java/util/TreeSet.TreeSet|<R|ft<kotlin/Int, kotlin/Int?>|>()
|
||||
public get(): R|java/util/SortedSet<kotlin/Int>|
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// FULL_JDK
|
||||
|
||||
import java.util.*
|
||||
|
||||
val x: SortedSet<Int> = <!INITIALIZER_TYPE_MISMATCH!>TreeSet()<!>
|
||||
val x: SortedSet<Int> = TreeSet()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: eqNotEq.kt
|
||||
public final fun checkNotNull(x: R|kotlin/Any?|): R|kotlin/Unit|
|
||||
public final fun checkNotNull(x: R|kotlin/Any?|): R|kotlin/Boolean|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> x != null
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun checkNotNull(x: Any?) {
|
||||
fun checkNotNull(x: Any?): Boolean {
|
||||
contract {
|
||||
returns(true) implies (x != null)
|
||||
returns(false) implies (x == null)
|
||||
}
|
||||
return <!RETURN_TYPE_MISMATCH!>x != null<!>
|
||||
return x != null
|
||||
}
|
||||
|
||||
fun trickyRequireNotNull(x: Any?) {
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: typePredicate.kt
|
||||
public final fun checkIsString(x: R|kotlin/Any|): R|kotlin/Unit|
|
||||
public final fun checkIsString(x: R|kotlin/Any|): R|kotlin/Boolean|
|
||||
[R|Contract description]
|
||||
<
|
||||
Returns(TRUE) -> x is kotlin/String
|
||||
|
||||
+2
-2
@@ -1,11 +1,11 @@
|
||||
import kotlin.contracts.*
|
||||
|
||||
fun checkIsString(x: Any) {
|
||||
fun checkIsString(x: Any): Boolean {
|
||||
contract {
|
||||
returns(true) implies (x is String)
|
||||
returns(false) implies (x !is String)
|
||||
}
|
||||
return <!RETURN_TYPE_MISMATCH!>x is String<!>
|
||||
return x is String
|
||||
}
|
||||
|
||||
fun test(x: Any) {
|
||||
|
||||
Reference in New Issue
Block a user