[NI] Improved testdata after changes in applicabilities
This commits introduces testdata changes, where NI behaviour strictly improved, after several previous fixes. For some tests, just WITH_NEW_INFERENCE directive was added. It indicates, that some of previous commits first introduced error in that test, and then some other commit fixed it (netting no overall testdata change). It is preferrably to keep those annotations until we will migrate to NI completely, to prevent unexpected regressions.
This commit is contained in:
Vendored
+1
-1
@@ -18,5 +18,5 @@ class OtherContainer<K>(val k: K) {
|
|||||||
fun test2() {
|
fun test2() {
|
||||||
val other: OtherContainer<String>? = null
|
val other: OtherContainer<String>? = null
|
||||||
// Error
|
// Error
|
||||||
for (s in <!NI;ITERATOR_MISSING, OI;ITERATOR_ON_NULLABLE!>other<!>) {}
|
for (s in <!ITERATOR_ON_NULLABLE!>other<!>) {}
|
||||||
}
|
}
|
||||||
|
|||||||
+3
-3
@@ -9,7 +9,7 @@ fun foo(): Int {
|
|||||||
val d: Data<Int>? = null
|
val d: Data<Int>? = null
|
||||||
// An error must be here
|
// An error must be here
|
||||||
val (x, y) = <!COMPONENT_FUNCTION_ON_NULLABLE, COMPONENT_FUNCTION_ON_NULLABLE!>d<!>
|
val (x, y) = <!COMPONENT_FUNCTION_ON_NULLABLE, COMPONENT_FUNCTION_ON_NULLABLE!>d<!>
|
||||||
return <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!><!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>y<!><!>
|
return <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!NI;DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>y<!>
|
||||||
}
|
}
|
||||||
|
|
||||||
data class NormalData<T>(val x: T, val y: T)
|
data class NormalData<T>(val x: T, val y: T)
|
||||||
@@ -17,6 +17,6 @@ data class NormalData<T>(val x: T, val y: T)
|
|||||||
fun bar(): Int {
|
fun bar(): Int {
|
||||||
val d: NormalData<Int>? = null
|
val d: NormalData<Int>? = null
|
||||||
// An error must be here
|
// An error must be here
|
||||||
val (x, y) = <!NI;COMPONENT_FUNCTION_MISSING, NI;COMPONENT_FUNCTION_MISSING, OI;COMPONENT_FUNCTION_ON_NULLABLE, OI;COMPONENT_FUNCTION_ON_NULLABLE!>d<!>
|
val (x, y) = <!COMPONENT_FUNCTION_ON_NULLABLE, COMPONENT_FUNCTION_ON_NULLABLE!>d<!>
|
||||||
return <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!><!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>y<!><!>
|
return <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>x<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>y<!>
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ class MyClass2 {}
|
|||||||
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1()<!> = 1.3
|
<!CONFLICTING_OVERLOADS!>fun MyClass2.component1()<!> = 1.3
|
||||||
|
|
||||||
fun test(mc1: MyClass, mc2: MyClass2) {
|
fun test(mc1: MyClass, mc2: MyClass2) {
|
||||||
val (<!OI;OPERATOR_MODIFIER_REQUIRED!>a<!>, b) = <!COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>mc1<!>
|
val (<!OPERATOR_MODIFIER_REQUIRED!>a<!>, b) = <!COMPONENT_FUNCTION_MISSING, COMPONENT_FUNCTION_MISSING!>mc1<!>
|
||||||
val (c) = <!COMPONENT_FUNCTION_AMBIGUITY!>mc2<!>
|
val (c) = <!COMPONENT_FUNCTION_AMBIGUITY!>mc2<!>
|
||||||
|
|
||||||
//a,b,c are error types
|
//a,b,c are error types
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class A
|
|||||||
infix operator fun A.plus(<!UNUSED_PARAMETER!>a<!> : Any) {
|
infix operator fun A.plus(<!UNUSED_PARAMETER!>a<!> : Any) {
|
||||||
|
|
||||||
1.foo()
|
1.foo()
|
||||||
true.<!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>(<!OI;NO_VALUE_FOR_PARAMETER, OI;NO_VALUE_FOR_PARAMETER!>)<!>
|
true.<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>foo<!>(<!NO_VALUE_FOR_PARAMETER, NO_VALUE_FOR_PARAMETER!>)<!>
|
||||||
|
|
||||||
<!UNUSED_EXPRESSION!>1<!>
|
<!UNUSED_EXPRESSION!>1<!>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// !WITH_NEW_INFERENCE
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
import java.util.stream.Collectors
|
import java.util.stream.Collectors
|
||||||
|
|||||||
+2
-2
@@ -11,6 +11,6 @@ fun test1() {
|
|||||||
|
|
||||||
fun test2() {
|
fun test2() {
|
||||||
val m0 = java.util.<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>HashMap<!>()
|
val m0 = java.util.<!OI;TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>HashMap<!>()
|
||||||
val m1 = java.util.<!NI;NONE_APPLICABLE!>HashMap<!><!OI;WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String, String, String><!>()
|
val m1 = java.util.HashMap<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String, String, String><!>()
|
||||||
val m2 = java.util.<!NI;NONE_APPLICABLE!>HashMap<!><!OI;WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String><!>()
|
val m2 = java.util.HashMap<!WRONG_NUMBER_OF_TYPE_ARGUMENTS!><String><!>()
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
// FILE: 1.kt
|
// FILE: 1.kt
|
||||||
package k
|
package k
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ fun test(f: Runnable.(Int) -> Unit, runnable: Runnable) {
|
|||||||
|
|
||||||
fun Int.test(f: String.(Int) -> Unit) {
|
fun Int.test(f: String.(Int) -> Unit) {
|
||||||
f("", 0)
|
f("", 0)
|
||||||
<!NI;DEBUG_INFO_MISSING_UNRESOLVED!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>f<!>(""<!OI;NO_VALUE_FOR_PARAMETER!>)<!><!>
|
f(""<!NO_VALUE_FOR_PARAMETER!>)<!>
|
||||||
with("") {
|
with("") {
|
||||||
f(0)
|
f(0)
|
||||||
f(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>0.0<!>)
|
f(<!CONSTANT_EXPECTED_TYPE_MISMATCH!>0.0<!>)
|
||||||
|
|||||||
+4
-4
@@ -9,17 +9,17 @@ operator infix fun A.div(<!UNUSED_PARAMETER!>i<!> : Int) {}
|
|||||||
operator infix fun A?.times(<!UNUSED_PARAMETER!>i<!> : Int) {}
|
operator infix fun A?.times(<!UNUSED_PARAMETER!>i<!> : Int) {}
|
||||||
|
|
||||||
fun test(x : Int?, a : A?) {
|
fun test(x : Int?, a : A?) {
|
||||||
x<!OI;UNSAFE_CALL!>.<!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>plus<!>(1)
|
x<!UNSAFE_CALL!>.<!>plus(1)
|
||||||
x?.plus(1)
|
x?.plus(1)
|
||||||
x <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> 1
|
x <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||||
<!UNSAFE_CALL!>-<!>x
|
<!UNSAFE_CALL!>-<!>x
|
||||||
x<!UNSAFE_CALL!>.<!>unaryMinus()
|
x<!UNSAFE_CALL!>.<!>unaryMinus()
|
||||||
x?.unaryMinus()
|
x?.unaryMinus()
|
||||||
|
|
||||||
a<!OI;UNSAFE_CALL!>.<!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>plus<!>(1)
|
a<!UNSAFE_CALL!>.<!>plus(1)
|
||||||
a?.plus(1)
|
a?.plus(1)
|
||||||
a <!UNSAFE_INFIX_CALL!>plus<!> 1
|
a <!UNSAFE_INFIX_CALL!>plus<!> 1
|
||||||
a <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> 1
|
a <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||||
<!UNSAFE_CALL!>-<!>a
|
<!UNSAFE_CALL!>-<!>a
|
||||||
a<!UNSAFE_CALL!>.<!>unaryMinus()
|
a<!UNSAFE_CALL!>.<!>unaryMinus()
|
||||||
a?.unaryMinus()
|
a?.unaryMinus()
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ fun foo() {
|
|||||||
val y: Int? = 0
|
val y: Int? = 0
|
||||||
val z: Int? = 0
|
val z: Int? = 0
|
||||||
bar(<!NI;TYPE_MISMATCH!>if (y != null) y else <!TYPE_MISMATCH!>z<!><!>, <!TYPE_MISMATCH!>y<!>)
|
bar(<!NI;TYPE_MISMATCH!>if (y != null) y else <!TYPE_MISMATCH!>z<!><!>, <!TYPE_MISMATCH!>y<!>)
|
||||||
y <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> 2
|
y <!UNSAFE_OPERATOR_CALL!>+<!> 2
|
||||||
baz(<!TYPE_MISMATCH!>y<!>, <!TYPE_MISMATCH!>y<!>, if (y == null) return else y, y)
|
baz(<!TYPE_MISMATCH!>y<!>, <!TYPE_MISMATCH!>y<!>, if (y == null) return else y, y)
|
||||||
baz(y, z!!, z, y)
|
baz(y, z!!, z, y)
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -38,7 +38,7 @@ fun test() {
|
|||||||
1 + platformJ
|
1 + platformJ
|
||||||
|
|
||||||
platformNN + 1
|
platformNN + 1
|
||||||
platformN <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> 1
|
platformN <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||||
platformJ + 1
|
platformJ + 1
|
||||||
|
|
||||||
1 <!INFIX_MODIFIER_REQUIRED!>plus<!> platformNN
|
1 <!INFIX_MODIFIER_REQUIRED!>plus<!> platformNN
|
||||||
@@ -50,6 +50,6 @@ fun test() {
|
|||||||
platformJ <!INFIX_MODIFIER_REQUIRED!>plus<!> 1
|
platformJ <!INFIX_MODIFIER_REQUIRED!>plus<!> 1
|
||||||
|
|
||||||
platformNN += 1
|
platformNN += 1
|
||||||
platformN <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+=<!> 1
|
platformN <!UNSAFE_OPERATOR_CALL!>+=<!> 1
|
||||||
platformJ += 1
|
platformJ += 1
|
||||||
}
|
}
|
||||||
@@ -12,8 +12,8 @@ operator fun Int?.contains(<!UNUSED_PARAMETER!>x<!> : Int) : Boolean = false
|
|||||||
fun f(): Unit {
|
fun f(): Unit {
|
||||||
var set : Set? = null
|
var set : Set? = null
|
||||||
val i : Int? = null
|
val i : Int? = null
|
||||||
i <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> 1
|
i <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||||
set + 1
|
set + 1
|
||||||
1 <!NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>in<!> set
|
1 <!UNSAFE_OPERATOR_CALL!>in<!> set
|
||||||
1 in 2
|
1 in 2
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ public class Manager {
|
|||||||
|
|
||||||
class Task(val callback: Manager.() -> Unit) : Runnable {
|
class Task(val callback: Manager.() -> Unit) : Runnable {
|
||||||
override public fun run() {
|
override public fun run() {
|
||||||
<!NI;DEBUG_INFO_MISSING_UNRESOLVED!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>callback<!>(<!OI;NO_VALUE_FOR_PARAMETER!>)<!><!> // Manager is not accessible here, but no error is shown
|
callback(<!NO_VALUE_FOR_PARAMETER!>)<!> // Manager is not accessible here, but no error is shown
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
+1
-1
@@ -41,7 +41,7 @@ fun test() {
|
|||||||
baz {
|
baz {
|
||||||
y()
|
y()
|
||||||
|
|
||||||
<!NI;DEBUG_INFO_MISSING_UNRESOLVED!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, OI;FUNCTION_EXPECTED, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>x<!>()<!>
|
<!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;FUNCTION_EXPECTED, OI;FUNCTION_EXPECTED, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>x<!>()
|
||||||
|
|
||||||
with(D()) {
|
with(D()) {
|
||||||
x()
|
x()
|
||||||
|
|||||||
+1
-1
@@ -37,7 +37,7 @@ fun test() {
|
|||||||
baz {
|
baz {
|
||||||
y()
|
y()
|
||||||
|
|
||||||
<!NI;DEBUG_INFO_MISSING_UNRESOLVED!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, OI;FUNCTION_EXPECTED, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>x<!>()<!>
|
<!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;FUNCTION_EXPECTED, OI;FUNCTION_EXPECTED, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>x<!>()
|
||||||
|
|
||||||
with(D()) {
|
with(D()) {
|
||||||
x()
|
x()
|
||||||
|
|||||||
Vendored
+2
-2
@@ -8,7 +8,7 @@ class SomeClass
|
|||||||
|
|
||||||
fun test(identifier: SomeClass, fn: String.() -> Unit) {
|
fun test(identifier: SomeClass, fn: String.() -> Unit) {
|
||||||
<!NI;NONE_APPLICABLE, OI;DEBUG_INFO_MISSING_UNRESOLVED, OI;FUNCTION_EXPECTED!>identifier<!>()
|
<!NI;NONE_APPLICABLE, OI;DEBUG_INFO_MISSING_UNRESOLVED, OI;FUNCTION_EXPECTED!>identifier<!>()
|
||||||
<!NI;DEBUG_INFO_MISSING_UNRESOLVED!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>(123)<!>
|
<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>(123)
|
||||||
<!NI;DEBUG_INFO_MISSING_UNRESOLVED!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>(1, 2)<!>
|
<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>identifier<!>(1, 2)
|
||||||
1.<!NI;DEBUG_INFO_MISSING_UNRESOLVED!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fn<!>()<!>
|
1.<!NI;DEBUG_INFO_MISSING_UNRESOLVED!><!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, UNRESOLVED_REFERENCE_WRONG_RECEIVER!>fn<!>()<!>
|
||||||
}
|
}
|
||||||
+2
-2
@@ -23,13 +23,13 @@ fun testDataFlowInfo1(a: Int?, b: Int?) {
|
|||||||
val c: Int = a ?: b!!
|
val c: Int = a ?: b!!
|
||||||
doInt(c)
|
doInt(c)
|
||||||
// b is nullable if a != null
|
// b is nullable if a != null
|
||||||
b <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> 1
|
b <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testDataFlowInfo2(a: Int?, b: Int?) {
|
fun testDataFlowInfo2(a: Int?, b: Int?) {
|
||||||
doInt(a ?: b!!)
|
doInt(a ?: b!!)
|
||||||
// b is nullable if a != null
|
// b is nullable if a != null
|
||||||
b <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> 1
|
b <!UNSAFE_OPERATOR_CALL!>+<!> 1
|
||||||
}
|
}
|
||||||
|
|
||||||
fun testTypeMismatch(a: String?, b: Any) {
|
fun testTypeMismatch(a: String?, b: Any) {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
open class B<R1, R2>(x: R1, y: R2)
|
open class B<R1, R2>(x: R1, y: R2)
|
||||||
|
|
||||||
class A0<T1, T2> {
|
class A0<T1, T2> {
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
class X<T>(val t: T) {
|
class X<T>(val t: T) {
|
||||||
constructor(t: T, i: Int) : this(<!TYPE_MISMATCH!>i<!>)
|
constructor(t: T, i: Int) : this(<!TYPE_MISMATCH!>i<!>)
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,6 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
class A {
|
class A {
|
||||||
constructor(x: Int) {}
|
constructor(x: Int) {}
|
||||||
constructor(x: String) {}
|
constructor(x: String) {}
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ fun foo(): Int {
|
|||||||
k.run()
|
k.run()
|
||||||
val d: Int = <!DEBUG_INFO_SMARTCAST!>c<!>
|
val d: Int = <!DEBUG_INFO_SMARTCAST!>c<!>
|
||||||
// a is captured so smart cast is not possible
|
// a is captured so smart cast is not possible
|
||||||
return d <!NI;NONE_APPLICABLE!>+<!> <!OI;SMARTCAST_IMPOSSIBLE!>a<!>
|
return d + <!NI;SMARTCAST_IMPOSSIBLE, SMARTCAST_IMPOSSIBLE!>a<!>
|
||||||
}
|
}
|
||||||
else return -1
|
else return -1
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ fun foo(): Int {
|
|||||||
k.run()
|
k.run()
|
||||||
val d: Int = <!DEBUG_INFO_SMARTCAST!>c<!>
|
val d: Int = <!DEBUG_INFO_SMARTCAST!>c<!>
|
||||||
// a is not null because of k constructor, but we do not know it
|
// a is not null because of k constructor, but we do not know it
|
||||||
return a <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> d
|
return a <!UNSAFE_OPERATOR_CALL!>+<!> d
|
||||||
}
|
}
|
||||||
else return -1
|
else return -1
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@ fun bar(arg: Long?): Long {
|
|||||||
return <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>i<!UNSAFE_CALL!>--<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> i<!>
|
return <!NI;TYPE_MISMATCH, NI;TYPE_MISMATCH!>i<!UNSAFE_CALL!>--<!> <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>+<!> i<!>
|
||||||
}
|
}
|
||||||
if (i++ == 7L) {
|
if (i++ == 7L) {
|
||||||
return i++ <!NI;DEBUG_INFO_UNRESOLVED_WITH_TARGET, NI;UNRESOLVED_REFERENCE_WRONG_RECEIVER, OI;UNSAFE_OPERATOR_CALL!>+<!> <!OI;TYPE_MISMATCH!>i<!>
|
return i++ <!NI;NONE_APPLICABLE, OI;UNSAFE_OPERATOR_CALL!>+<!> <!OI;TYPE_MISMATCH!>i<!>
|
||||||
}
|
}
|
||||||
return 0L
|
return 0L
|
||||||
}
|
}
|
||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// !WITH_NEW_INFERENCE
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
import java.util.concurrent.*
|
import java.util.concurrent.*
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
// !DIAGNOSTICS: -UNUSED_PARAMETER -PARAMETER_NAME_CHANGED_ON_OVERRIDE
|
// !DIAGNOSTICS: -UNUSED_PARAMETER -PARAMETER_NAME_CHANGED_ON_OVERRIDE
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
class KotlinMap1<K, V> : java.util.AbstractMap<K, V>() {
|
class KotlinMap1<K, V> : java.util.AbstractMap<K, V>() {
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// !WITH_NEW_INFERENCE
|
||||||
// FULL_JDK
|
// FULL_JDK
|
||||||
|
|
||||||
import java.util.stream.*
|
import java.util.stream.*
|
||||||
|
|||||||
+6
-6
@@ -10,18 +10,18 @@ open class MyClass private constructor(val x: Int) {
|
|||||||
|
|
||||||
typealias MyAlias = MyClass
|
typealias MyAlias = MyClass
|
||||||
|
|
||||||
val test1 = <!OI;INVISIBLE_MEMBER!>MyAlias<!>(<!NI;CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
val test1 = <!INVISIBLE_MEMBER!>MyAlias<!>(1)
|
||||||
val test1a = <!OI;INVISIBLE_MEMBER!>MyClass<!>(<!NI;CONSTANT_EXPECTED_TYPE_MISMATCH!>1<!>)
|
val test1a = <!INVISIBLE_MEMBER!>MyClass<!>(1)
|
||||||
|
|
||||||
val test2 = <!OI;INVISIBLE_MEMBER!>MyAlias<!>(<!NI;TYPE_MISMATCH!>""<!>)
|
val test2 = <!INVISIBLE_MEMBER!>MyAlias<!>("")
|
||||||
val test2a = <!OI;INVISIBLE_MEMBER!>MyClass<!>(<!NI;TYPE_MISMATCH!>""<!>)
|
val test2a = <!INVISIBLE_MEMBER!>MyClass<!>("")
|
||||||
|
|
||||||
val test3 = MyAlias(1.0)
|
val test3 = MyAlias(1.0)
|
||||||
val test3a = MyClass(1.0)
|
val test3a = MyClass(1.0)
|
||||||
|
|
||||||
class MyDerived : MyClass(1.0) {
|
class MyDerived : MyClass(1.0) {
|
||||||
val test4 = <!NI;NONE_APPLICABLE, OI;INVISIBLE_MEMBER!>MyAlias<!>(1)
|
val test4 = <!INVISIBLE_MEMBER!>MyAlias<!>(1)
|
||||||
val test4a = <!NI;NONE_APPLICABLE, OI;INVISIBLE_MEMBER!>MyClass<!>(1)
|
val test4a = <!INVISIBLE_MEMBER!>MyClass<!>(1)
|
||||||
val test5 = <!PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL!>MyAlias<!>("")
|
val test5 = <!PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL!>MyAlias<!>("")
|
||||||
val test5a = <!OI;PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL!>MyClass<!>("")
|
val test5a = <!OI;PROTECTED_CONSTRUCTOR_NOT_IN_SUPER_CALL!>MyClass<!>("")
|
||||||
val test6 = MyAlias(1.0)
|
val test6 = MyAlias(1.0)
|
||||||
|
|||||||
+2
-2
@@ -19,8 +19,8 @@ public open class MyClass {
|
|||||||
|
|
||||||
public final class MyDerived : MyClass {
|
public final class MyDerived : MyClass {
|
||||||
public constructor MyDerived()
|
public constructor MyDerived()
|
||||||
public final val test4: [ERROR : Type for MyAlias(1)]
|
public final val test4: MyAlias /* = MyClass */
|
||||||
public final val test4a: [ERROR : Type for MyClass(1)]
|
public final val test4a: MyClass
|
||||||
public final val test5: MyAlias /* = MyClass */
|
public final val test5: MyAlias /* = MyClass */
|
||||||
public final val test5a: MyClass
|
public final val test5a: MyClass
|
||||||
public final val test6: MyAlias /* = MyClass */
|
public final val test6: MyAlias /* = MyClass */
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
// NI_EXPECTED_FILE
|
||||||
|
|
||||||
object ObjectWithInvoke {
|
object ObjectWithInvoke {
|
||||||
operator fun invoke() = this
|
operator fun invoke() = this
|
||||||
}
|
}
|
||||||
|
|||||||
+33
@@ -0,0 +1,33 @@
|
|||||||
|
package
|
||||||
|
|
||||||
|
public val test1: ObjectWithInvoke
|
||||||
|
public val test2: ObjectWithInvoke
|
||||||
|
public val test3: CWI /* = ClassWithCompanionObjectWithInvoke */
|
||||||
|
public val test4: kotlin.Any
|
||||||
|
public val test5: kotlin.Any
|
||||||
|
public val test5a: kotlin.Any
|
||||||
|
|
||||||
|
public final class ClassWithCompanionObjectWithInvoke {
|
||||||
|
public constructor ClassWithCompanionObjectWithInvoke()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
|
||||||
|
public companion object Companion {
|
||||||
|
private constructor Companion()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public final operator fun invoke(/*0*/ x: kotlin.Any): kotlin.Any
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public object ObjectWithInvoke {
|
||||||
|
private constructor ObjectWithInvoke()
|
||||||
|
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
|
||||||
|
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int
|
||||||
|
public final operator fun invoke(): ObjectWithInvoke
|
||||||
|
public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String
|
||||||
|
}
|
||||||
|
public typealias CWI = ClassWithCompanionObjectWithInvoke
|
||||||
|
public typealias WI = ObjectWithInvoke
|
||||||
+2
-1
@@ -1,5 +1,6 @@
|
|||||||
// !LANGUAGE: +ReturnsEffect
|
// !LANGUAGE: +ReturnsEffect
|
||||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
import kotlin.internal.contracts.*
|
import kotlin.internal.contracts.*
|
||||||
|
|
||||||
@@ -97,6 +98,6 @@ fun branchedAndNestedWithNativeOperators(x: Any?, y: Any?) {
|
|||||||
)
|
)
|
||||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+7
-6
@@ -1,5 +1,6 @@
|
|||||||
// !LANGUAGE: +ReturnsEffect
|
// !LANGUAGE: +ReturnsEffect
|
||||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
import kotlin.internal.contracts.*
|
import kotlin.internal.contracts.*
|
||||||
|
|
||||||
@@ -29,12 +30,12 @@ fun intersectingInfo(x: Any?, y: Any?) {
|
|||||||
if ((isString(x) && y is String) || (!notIsString(x) && !notIsInt(y))) {
|
if ((isString(x) && y is String) || (!notIsString(x) && !notIsInt(y))) {
|
||||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -47,13 +48,13 @@ fun intersectingInfo2(x: Any?, y: Any?) {
|
|||||||
(!notIsString(x) && isString(y) && y is Int) ||
|
(!notIsString(x) && isString(y) && y is Int) ||
|
||||||
(x is String && !notIsInt(y) && x is Int)) {
|
(x is String && !notIsInt(y) && x is Int)) {
|
||||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
y.<!UNRESOLVED_REFERENCE!>length<!>
|
y.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
y.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
y.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+3
-2
@@ -1,5 +1,6 @@
|
|||||||
// !LANGUAGE: +ReturnsEffect
|
// !LANGUAGE: +ReturnsEffect
|
||||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
import kotlin.internal.contracts.*
|
import kotlin.internal.contracts.*
|
||||||
|
|
||||||
@@ -26,7 +27,7 @@ fun testDeMorgan(x: Any?) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ fun testDeMorgan2(x: Any?) {
|
|||||||
// x !is String || x !is Int
|
// x !is String || x !is Int
|
||||||
if (notIsString(x) || notIsInt(x)) {
|
if (notIsString(x) || notIsInt(x)) {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||||
|
|||||||
+1
@@ -1,5 +1,6 @@
|
|||||||
// !LANGUAGE: +ReturnsEffect
|
// !LANGUAGE: +ReturnsEffect
|
||||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
import kotlin.internal.contracts.*
|
import kotlin.internal.contracts.*
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-6
@@ -1,5 +1,6 @@
|
|||||||
// !LANGUAGE: +ReturnsEffect
|
// !LANGUAGE: +ReturnsEffect
|
||||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
import kotlin.internal.contracts.*
|
import kotlin.internal.contracts.*
|
||||||
|
|
||||||
@@ -40,17 +41,17 @@ fun truetrue(x: Any?) {
|
|||||||
<!DEBUG_INFO_SMARTCAST!>x<!>.inc()
|
<!DEBUG_INFO_SMARTCAST!>x<!>.inc()
|
||||||
}
|
}
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun truefalse(x: Any?) {
|
fun truefalse(x: Any?) {
|
||||||
if (trueWhenString(x) && falseWhenInt(x)) {
|
if (trueWhenString(x) && falseWhenInt(x)) {
|
||||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,19 +62,19 @@ fun falsetrue(x: Any?) {
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun falsefalse(x: Any?) {
|
fun falsefalse(x: Any?) {
|
||||||
if (falseWhenString(x) && falseWhenInt(x)) {
|
if (falseWhenString(x) && falseWhenInt(x)) {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// Note that we can't argue that we have any of smartcasts here,
|
// Note that we can't argue that we have any of smartcasts here,
|
||||||
// because we don't know which one of both arguments was 'false' to bring us here
|
// because we don't know which one of both arguments was 'false' to bring us here
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Vendored
+1
@@ -1,5 +1,6 @@
|
|||||||
// !LANGUAGE: +ReturnsEffect
|
// !LANGUAGE: +ReturnsEffect
|
||||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
import kotlin.internal.contracts.*
|
import kotlin.internal.contracts.*
|
||||||
|
|
||||||
|
|||||||
Vendored
+7
-6
@@ -1,5 +1,6 @@
|
|||||||
// !LANGUAGE: +ReturnsEffect
|
// !LANGUAGE: +ReturnsEffect
|
||||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
import kotlin.internal.contracts.*
|
import kotlin.internal.contracts.*
|
||||||
|
|
||||||
@@ -34,18 +35,18 @@ fun falseWhenInt(x: Any?): Boolean {
|
|||||||
fun truetrue(x: Any?) {
|
fun truetrue(x: Any?) {
|
||||||
if (trueWhenString(x) || trueWhenInt(x)) {
|
if (trueWhenString(x) || trueWhenInt(x)) {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun truefalse(x: Any?) {
|
fun truefalse(x: Any?) {
|
||||||
if (trueWhenString(x) || falseWhenInt(x)) {
|
if (trueWhenString(x) || falseWhenInt(x)) {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
@@ -56,18 +57,18 @@ fun truefalse(x: Any?) {
|
|||||||
fun falsetrue(x: Any?) {
|
fun falsetrue(x: Any?) {
|
||||||
if (falseWhenString(x) || trueWhenInt(x)) {
|
if (falseWhenString(x) || trueWhenInt(x)) {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun falsefalse(x: Any?) {
|
fun falsefalse(x: Any?) {
|
||||||
if (falseWhenString(x) || falseWhenInt(x)) {
|
if (falseWhenString(x) || falseWhenInt(x)) {
|
||||||
x.<!UNRESOLVED_REFERENCE!>length<!>
|
x.<!UNRESOLVED_REFERENCE!>length<!>
|
||||||
x.<!UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
x.<!NI;NONE_APPLICABLE, OI;UNRESOLVED_REFERENCE_WRONG_RECEIVER!>inc<!>()
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
<!DEBUG_INFO_SMARTCAST!>x<!>.length
|
||||||
|
|||||||
+1
@@ -1,5 +1,6 @@
|
|||||||
// !LANGUAGE: +ReturnsEffect
|
// !LANGUAGE: +ReturnsEffect
|
||||||
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
// !DIAGNOSTICS: -INVISIBLE_REFERENCE -INVISIBLE_MEMBER
|
||||||
|
// !WITH_NEW_INFERENCE
|
||||||
|
|
||||||
import kotlin.internal.contracts.*
|
import kotlin.internal.contracts.*
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user