[FIR] Implement suppressing diagnostics with @Suppress
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
FILE: allWarnings.kt
|
||||
@R|kotlin/Suppress|(vararg(String(warnings))) public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
public final fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
|
||||
@Suppress("warnings")
|
||||
public class A {
|
||||
final fun foo() {}
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
FILE: multipleWarnings.kt
|
||||
@R|kotlin/Suppress|(vararg(String(REDUNDANT_VISIBILITY_MODIFIER))) public final class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
@R|kotlin/Suppress|(vararg(String(REDUNDANT_MODALITY_MODIFIER))) public final fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
|
||||
@Suppress("REDUNDANT_VISIBILITY_MODIFIER")
|
||||
public class A {
|
||||
@Suppress("REDUNDANT_MODALITY_MODIFIER")
|
||||
public final fun foo() {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
FILE: singleError.kt
|
||||
public final fun foo(x: R|kotlin/String|): R|kotlin/Unit| {
|
||||
}
|
||||
@R|kotlin/Suppress|(vararg(String(INAPPLICABLE_CANDIDATE))) public final fun bar(): R|kotlin/Unit| {
|
||||
<Inapplicable(INAPPLICABLE): /foo>#(Int(10))
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
fun foo(x: String) {}
|
||||
|
||||
@Suppress("INAPPLICABLE_CANDIDATE")
|
||||
fun bar() {
|
||||
foo(10)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
FILE: singleWarning.kt
|
||||
@R|kotlin/Suppress|(vararg(String(REDUNDANT_VISIBILITY_MODIFIER))) public final fun foo(): R|kotlin/Unit| {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
// WITH_EXTENDED_CHECKERS
|
||||
|
||||
@Suppress("REDUNDANT_VISIBILITY_MODIFIER")
|
||||
public fun foo() {}
|
||||
Reference in New Issue
Block a user