[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
-3
@@ -5,7 +5,7 @@ class MyInt(val i: Int) {
|
||||
operator fun plus(m: MyInt) : MyInt = MyInt(m.i + i)
|
||||
}
|
||||
|
||||
operator fun Any.plusAssign(<!UNUSED_PARAMETER!>a<!>: Any) {}
|
||||
operator fun Any.plusAssign(a: Any) {}
|
||||
|
||||
fun test(m: MyInt) {
|
||||
m += m
|
||||
@@ -13,5 +13,3 @@ fun test(m: MyInt) {
|
||||
var i = 1
|
||||
i <!ASSIGN_OPERATOR_AMBIGUITY!>+=<!> 34
|
||||
}
|
||||
|
||||
|
||||
|
||||
-40
@@ -1,40 +0,0 @@
|
||||
class A {
|
||||
operator fun plusAssign(x: Int) {}
|
||||
operator fun minusAssign(x: Int) {}
|
||||
operator fun timesAssign(x: Int) {}
|
||||
operator fun divAssign(x: Int) {}
|
||||
operator fun remAssign(x: Int) {}
|
||||
}
|
||||
|
||||
fun testVal() {
|
||||
val a = A()
|
||||
a += 1
|
||||
a -= 1
|
||||
a *= 1
|
||||
a /= 1
|
||||
a %= 1
|
||||
}
|
||||
|
||||
fun testExpr() {
|
||||
A() += 1
|
||||
A() -= 1
|
||||
A() *= 1
|
||||
A() /= 1
|
||||
A() %= 1
|
||||
}
|
||||
|
||||
class B {
|
||||
operator fun plus(x: Int): B = B()
|
||||
operator fun minus(x: Int): B = B()
|
||||
operator fun times(x: Int): B = B()
|
||||
operator fun div(x: Int): B = B()
|
||||
operator fun rem(x: Int): B = B()
|
||||
}
|
||||
|
||||
fun testWrong() {
|
||||
<!VARIABLE_EXPECTED!>B()<!> += 1
|
||||
<!VARIABLE_EXPECTED!>B()<!> -= 1
|
||||
<!VARIABLE_EXPECTED!>B()<!> *= 1
|
||||
<!VARIABLE_EXPECTED!>B()<!> /= 1
|
||||
<!VARIABLE_EXPECTED!>B()<!> %= 1
|
||||
}
|
||||
+12
-11
@@ -1,9 +1,10 @@
|
||||
// FIR_IDENTICAL
|
||||
class A {
|
||||
operator fun plusAssign(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
operator fun minusAssign(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
operator fun timesAssign(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
operator fun divAssign(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
operator fun remAssign(<!UNUSED_PARAMETER!>x<!>: Int) {}
|
||||
operator fun plusAssign(x: Int) {}
|
||||
operator fun minusAssign(x: Int) {}
|
||||
operator fun timesAssign(x: Int) {}
|
||||
operator fun divAssign(x: Int) {}
|
||||
operator fun remAssign(x: Int) {}
|
||||
}
|
||||
|
||||
fun testVal() {
|
||||
@@ -24,11 +25,11 @@ fun testExpr() {
|
||||
}
|
||||
|
||||
class B {
|
||||
operator fun plus(<!UNUSED_PARAMETER!>x<!>: Int): B = B()
|
||||
operator fun minus(<!UNUSED_PARAMETER!>x<!>: Int): B = B()
|
||||
operator fun times(<!UNUSED_PARAMETER!>x<!>: Int): B = B()
|
||||
operator fun div(<!UNUSED_PARAMETER!>x<!>: Int): B = B()
|
||||
operator fun rem(<!UNUSED_PARAMETER!>x<!>: Int): B = B()
|
||||
operator fun plus(x: Int): B = B()
|
||||
operator fun minus(x: Int): B = B()
|
||||
operator fun times(x: Int): B = B()
|
||||
operator fun div(x: Int): B = B()
|
||||
operator fun rem(x: Int): B = B()
|
||||
}
|
||||
|
||||
fun testWrong() {
|
||||
@@ -37,4 +38,4 @@ fun testWrong() {
|
||||
<!VARIABLE_EXPECTED!>B()<!> *= 1
|
||||
<!VARIABLE_EXPECTED!>B()<!> /= 1
|
||||
<!VARIABLE_EXPECTED!>B()<!> %= 1
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
class A {
|
||||
operator fun get(x: Int): Int = x
|
||||
fun set(<!UNUSED_PARAMETER!>x<!>: Int, <!UNUSED_PARAMETER!>y<!>: Int) {} // no `operator` modifier
|
||||
fun set(x: Int, y: Int) {} // no `operator` modifier
|
||||
}
|
||||
|
||||
fun main() {
|
||||
|
||||
Reference in New Issue
Block a user