K2: Avoid losing diagnostics for synthetic calls
Some of the changed tests may duplicate other existing diagnostics, but that should not be reason not to report them at all. There might be another job to be done to avoid diagnostic duplications
This commit is contained in:
committed by
Space Team
parent
fe5adab652
commit
d7399ed1cf
compiler/testData/diagnostics/tests/collectionLiterals/collectionLiteralsOutsideOfAnnotations.fir.kt
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
||||
|
||||
fun takeArray(array: Array<String>) {}
|
||||
|
||||
fun test() {
|
||||
"foo bar".<!UNRESOLVED_REFERENCE!>split<!>(<!UNSUPPORTED!>[""]<!>)
|
||||
<!UNRESOLVED_REFERENCE!>unresolved<!>(<!UNSUPPORTED!>[""]<!>)
|
||||
takeArray(<!UNSUPPORTED!>[""]<!>)
|
||||
val v = <!UNSUPPORTED!>[""]<!>
|
||||
<!UNSUPPORTED!>[""]<!>
|
||||
<!UNSUPPORTED!>[1, 2, 3]<!>.size
|
||||
}
|
||||
|
||||
fun baz(arg: Array<Int> = <!UNSUPPORTED!>[]<!>) {
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>if (true) <!UNSUPPORTED!>["yes"]<!> else {<!UNSUPPORTED!>["no"]<!>}<!>
|
||||
}
|
||||
|
||||
class Foo(
|
||||
val v: Array<Int> = <!UNSUPPORTED!>[]<!>
|
||||
)
|
||||
Vendored
-1
@@ -1,4 +1,3 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_VARIABLE -UNUSED_PARAMETER
|
||||
|
||||
fun takeArray(array: Array<String>) {}
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
fun main() {
|
||||
<!UNSUPPORTED!>[]<!><!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>!!
|
||||
}
|
||||
<!NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER, NEW_INFERENCE_NO_INFORMATION_FOR_PARAMETER!><!UNSUPPORTED!>[]<!><!UNNECESSARY_NOT_NULL_ASSERTION!>!!<!>!!<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user