[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
@@ -1,4 +1,4 @@
|
||||
fun devNull(<!UNUSED_PARAMETER!>obj<!>: Any?) {}
|
||||
fun devNull(obj: Any?) {}
|
||||
|
||||
open class A {
|
||||
companion object {
|
||||
|
||||
@@ -21,7 +21,7 @@ class E : D() {
|
||||
internal <!CANNOT_OVERRIDE_INVISIBLE_MEMBER!>override<!> fun self() = this
|
||||
|
||||
fun test() {
|
||||
val <!UNUSED_VARIABLE!>s<!> : E = self()
|
||||
val s : E = self()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-5
@@ -1,5 +0,0 @@
|
||||
class A(val foo: Int)
|
||||
|
||||
fun A.test(foo: String) {
|
||||
val a: String = foo
|
||||
}
|
||||
+3
-2
@@ -1,5 +1,6 @@
|
||||
// FIR_IDENTICAL
|
||||
class A(val foo: Int)
|
||||
|
||||
fun A.test(foo: String) {
|
||||
val <!UNUSED_VARIABLE!>a<!>: String = foo
|
||||
}
|
||||
val a: String = foo
|
||||
}
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
fun foo(init: A.() -> Unit) { }
|
||||
|
||||
class A {
|
||||
var x: Int = 0
|
||||
companion object {
|
||||
val f = foo() {
|
||||
x = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class B(val a: String) {
|
||||
fun f() = 0
|
||||
companion object {
|
||||
fun B.bar() = a + f()
|
||||
}
|
||||
}
|
||||
|
||||
open class C {
|
||||
fun bar() {}
|
||||
}
|
||||
|
||||
class E: C() {
|
||||
|
||||
class D {
|
||||
init {
|
||||
with(C()) {
|
||||
bar()
|
||||
this.bar()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
fun foo(<!UNUSED_PARAMETER!>init<!>: A.() -> Unit) { }
|
||||
// FIR_IDENTICAL
|
||||
fun foo(init: A.() -> Unit) { }
|
||||
|
||||
class A {
|
||||
var x: Int = 0
|
||||
@@ -30,4 +31,4 @@ class E: C() {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
-19
@@ -1,19 +0,0 @@
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
public static int foo() {return 1;}
|
||||
}
|
||||
|
||||
// FILE: B.java
|
||||
public class B extends A {
|
||||
public static int foo() {return 1;}
|
||||
}
|
||||
|
||||
// FILE: 1.kt
|
||||
|
||||
fun foo() = ""
|
||||
|
||||
class C: B() {
|
||||
init {
|
||||
val a: Int = foo()
|
||||
}
|
||||
}
|
||||
+3
-2
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// FILE: A.java
|
||||
public class A {
|
||||
public static int foo() {return 1;}
|
||||
@@ -14,6 +15,6 @@ fun foo() = ""
|
||||
|
||||
class C: B() {
|
||||
init {
|
||||
val <!UNUSED_VARIABLE!>a<!>: Int = foo()
|
||||
val a: Int = foo()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,15 +0,0 @@
|
||||
//FILE:a.kt
|
||||
//KT-1580 Can't access nested class/interface from other package
|
||||
package lib
|
||||
interface WithInner {
|
||||
interface Inner {
|
||||
}
|
||||
}
|
||||
|
||||
//FILE:b.kt
|
||||
package user
|
||||
|
||||
import lib.WithInner
|
||||
|
||||
fun main(a : WithInner, b : WithInner.Inner) {
|
||||
}
|
||||
+3
-2
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
//FILE:a.kt
|
||||
//KT-1580 Can't access nested class/interface from other package
|
||||
package lib
|
||||
@@ -11,5 +12,5 @@ package user
|
||||
|
||||
import lib.WithInner
|
||||
|
||||
fun main(<!UNUSED_PARAMETER!>a<!> : WithInner, <!UNUSED_PARAMETER!>b<!> : WithInner.Inner) {
|
||||
}
|
||||
fun main(a : WithInner, b : WithInner.Inner) {
|
||||
}
|
||||
|
||||
+1
-1
@@ -14,6 +14,6 @@ import a.C
|
||||
|
||||
class A : C() {
|
||||
fun test() {
|
||||
val <!UNUSED_VARIABLE!>v<!> = <!INVISIBLE_MEMBER!>myValue<!>
|
||||
val v = <!INVISIBLE_MEMBER!>myValue<!>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,15 +5,15 @@ import java.util.HashMap
|
||||
|
||||
//KT-250 Incorrect variable resolve in constructor arguments of superclass
|
||||
open class A(val x: Int)
|
||||
class B(<!UNUSED_PARAMETER!>y<!>: Int) : A(<!UNRESOLVED_REFERENCE!>x<!>) //x is resolved as a property in a, so no error is generated
|
||||
class B(y: Int) : A(<!UNRESOLVED_REFERENCE!>x<!>) //x is resolved as a property in a, so no error is generated
|
||||
|
||||
//KT-617 Prohibit dollars in call to superclass constructors
|
||||
open class M(<!UNUSED_PARAMETER!>p<!>: Int)
|
||||
open class M(p: Int)
|
||||
class N(val p: Int) : A(<!SYNTAX!><!SYNTAX!><!>$p<!><!SYNTAX!>)<!>
|
||||
|
||||
//KT-10 Don't allow to use properties in supertype initializers
|
||||
open class Element()
|
||||
class TextElement(<!UNUSED_PARAMETER!>name<!>: String) : Element()
|
||||
class TextElement(name: String) : Element()
|
||||
|
||||
abstract class Tag(val name : String) {
|
||||
val children = ArrayList<Element>()
|
||||
@@ -36,7 +36,7 @@ class Body1() : BodyTag(<!NO_THIS!>this<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>name
|
||||
|
||||
//more tests
|
||||
|
||||
open class X(<!UNUSED_PARAMETER!>p<!>: Int, <!UNUSED_PARAMETER!>r<!>: Int) {
|
||||
open class X(p: Int, r: Int) {
|
||||
val s = "s"
|
||||
}
|
||||
|
||||
@@ -46,4 +46,4 @@ class Y(i: Int) : X(i, <!UNRESOLVED_REFERENCE!>rrr<!>) {
|
||||
|
||||
class Z(val i: Int) : X(<!UNRESOLVED_REFERENCE!>s<!>, <!UNRESOLVED_REFERENCE!>x<!>) {
|
||||
val x = 2
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -10,9 +10,9 @@ class B : A() {
|
||||
|
||||
var b : Int
|
||||
<!REDUNDANT_MODIFIER_IN_GETTER!>public<!> get() = 23
|
||||
set(<!UNUSED_PARAMETER!>i<!>: Int) {}
|
||||
set(i: Int) {}
|
||||
|
||||
protected var c : Int
|
||||
get() = 23
|
||||
private set(<!UNUSED_PARAMETER!>i<!>: Int) {}
|
||||
}
|
||||
private set(i: Int) {}
|
||||
}
|
||||
|
||||
+3
-3
@@ -5,8 +5,8 @@ import c.A.Companion.B
|
||||
import c.<!CANNOT_ALL_UNDER_IMPORT_FROM_SINGLETON!>M<!>.*
|
||||
|
||||
fun foo() {
|
||||
val <!UNUSED_VARIABLE!>b<!>: B = B()
|
||||
var <!UNUSED_VARIABLE!>r<!>: <!UNRESOLVED_REFERENCE!>R<!> = <!UNRESOLVED_REFERENCE!>R<!>()
|
||||
val b: B = B()
|
||||
var r: <!UNRESOLVED_REFERENCE!>R<!> = <!UNRESOLVED_REFERENCE!>R<!>()
|
||||
}
|
||||
|
||||
class A() {
|
||||
@@ -21,4 +21,4 @@ class A() {
|
||||
object M {
|
||||
fun foo() {}
|
||||
class R() {}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-3
@@ -4,7 +4,7 @@
|
||||
package a
|
||||
|
||||
fun foo() {
|
||||
val <!UNUSED_VARIABLE!>b<!> : <!UNRESOLVED_REFERENCE!>B<!> = <!UNRESOLVED_REFERENCE!>B<!>() //only B() is unresolved, but in ": B" and "B.foo()" B should also be unresolved
|
||||
val b : <!UNRESOLVED_REFERENCE!>B<!> = <!UNRESOLVED_REFERENCE!>B<!>() //only B() is unresolved, but in ": B" and "B.foo()" B should also be unresolved
|
||||
<!UNRESOLVED_REFERENCE!>B<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!>()
|
||||
|
||||
<!UNRESOLVED_REFERENCE!>P<!>.<!DEBUG_INFO_MISSING_UNRESOLVED!>foo<!>()
|
||||
@@ -40,7 +40,7 @@ import b.A.Companion.P
|
||||
import b.A.Companion.B
|
||||
|
||||
fun foo() {
|
||||
val <!UNUSED_VARIABLE!>b<!> : B = B()
|
||||
val b : B = B()
|
||||
B.foo()
|
||||
|
||||
P.foo()
|
||||
@@ -66,4 +66,4 @@ object N {
|
||||
object M {
|
||||
fun bar() {}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user