[Test] Disable UNUSED_* diagnostics in tests which are not belong to contolFlowAnalysis suite
This commit is contained in:
committed by
TeamCityServer
parent
85949b387e
commit
cd890d5833
Vendored
-12
@@ -1,12 +0,0 @@
|
||||
interface A
|
||||
interface Foo {
|
||||
operator fun A.invoke()
|
||||
}
|
||||
|
||||
fun test(a: A, foo: Foo) {
|
||||
a.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
}
|
||||
|
||||
fun test(a: Int, foo: Int.()->Unit) {
|
||||
a.foo()
|
||||
}
|
||||
Vendored
+3
-2
@@ -1,12 +1,13 @@
|
||||
// FIR_IDENTICAL
|
||||
interface A
|
||||
interface Foo {
|
||||
operator fun A.invoke()
|
||||
}
|
||||
|
||||
fun test(a: A, <!UNUSED_PARAMETER!>foo<!>: Foo) {
|
||||
fun test(a: A, foo: Foo) {
|
||||
a.<!UNRESOLVED_REFERENCE!>foo<!>()
|
||||
}
|
||||
|
||||
fun test(a: Int, foo: Int.()->Unit) {
|
||||
a.foo()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
//KT-3772 Invoke and overload resolution ambiguity
|
||||
package bar
|
||||
|
||||
open class A {
|
||||
public operator fun invoke(f: A.() -> Unit) {}
|
||||
}
|
||||
|
||||
class B {
|
||||
public operator fun invoke(f: B.() -> Unit) {}
|
||||
}
|
||||
|
||||
open class C
|
||||
val C.attr: A
|
||||
get() = A()
|
||||
|
||||
open class D: C()
|
||||
val D.attr: B
|
||||
get() = B()
|
||||
|
||||
|
||||
fun main() {
|
||||
val b = D()
|
||||
b.attr {} // overload resolution ambiguity
|
||||
|
||||
val d = b.attr
|
||||
d {} // no error
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
// FIR_IDENTICAL
|
||||
//KT-3772 Invoke and overload resolution ambiguity
|
||||
package bar
|
||||
|
||||
open class A {
|
||||
public operator fun invoke(<!UNUSED_PARAMETER!>f<!>: A.() -> Unit) {}
|
||||
public operator fun invoke(f: A.() -> Unit) {}
|
||||
}
|
||||
|
||||
class B {
|
||||
public operator fun invoke(<!UNUSED_PARAMETER!>f<!>: B.() -> Unit) {}
|
||||
public operator fun invoke(f: B.() -> Unit) {}
|
||||
}
|
||||
|
||||
open class C
|
||||
@@ -24,4 +25,4 @@ fun main() {
|
||||
|
||||
val d = b.attr
|
||||
d {} // no error
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -3,7 +3,7 @@ package c
|
||||
|
||||
public abstract class TestBug1() {
|
||||
|
||||
public fun m3(<!UNUSED_PARAMETER!>position<!>: Int) {
|
||||
public fun m3(position: Int) {
|
||||
position(m1().second<!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public abstract class TestBug1() {
|
||||
|
||||
<!INCOMPATIBLE_MODIFIERS!>private<!> <!INCOMPATIBLE_MODIFIERS!>abstract<!> fun m1(): Pair<Int, Int>
|
||||
|
||||
private fun position(<!UNUSED_PARAMETER!>p<!>: Int) {}
|
||||
private fun position(p: Int) {}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
//KT-9517 Wrong resolve for invoke convention after smart cast
|
||||
open class A {
|
||||
open val foo: () -> Number = null!!
|
||||
@@ -11,6 +10,6 @@ class B: A() {
|
||||
|
||||
fun test(a: A) {
|
||||
if (a is B) {
|
||||
val <!UNUSED_VARIABLE!>foo<!>: Int = <!DEBUG_INFO_SMARTCAST!>a<!>.foo() // B::foo + invoke()
|
||||
val foo: Int = <!DEBUG_INFO_SMARTCAST!>a<!>.foo() // B::foo + invoke()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,12 +9,12 @@ class A {
|
||||
val B.a: () -> Int get() = { 5 }
|
||||
|
||||
fun test(a: A, b: B) {
|
||||
val <!UNUSED_VARIABLE!>x<!>: Int = b.a()
|
||||
val x: Int = b.a()
|
||||
|
||||
b.<!FUNCTION_EXPECTED!>(a)<!>()
|
||||
|
||||
with(b) {
|
||||
val <!UNUSED_VARIABLE!>y<!>: Int = a()
|
||||
val y: Int = a()
|
||||
<!FUNCTION_EXPECTED!>(a)<!>()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user