FIR checker: report UNINITIALIZED_PARAMETER
This commit is contained in:
committed by
TeamCityServer
parent
d2f831b635
commit
bdfc879f00
-6
@@ -1,6 +0,0 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun foo() {
|
||||
fun bar(x: String, y: String = x) {}
|
||||
fun baz(x: Int = <!UNRESOLVED_REFERENCE!>y<!>, y: Int) {}
|
||||
}
|
||||
+3
-1
@@ -1,6 +1,8 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun foo() {
|
||||
fun foo(x: Int = <!UNINITIALIZED_PARAMETER!>x<!>) {}
|
||||
fun bar(x: String, y: String = x) {}
|
||||
fun baz(x: Int = <!UNINITIALIZED_PARAMETER!>y<!>, y: Int) {}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ fun foo() {
|
||||
10
|
||||
}
|
||||
fun bar(x: Exception = `_`) {}
|
||||
class Bar(`_`: Exception = `_`) {
|
||||
class Bar(`_`: Exception = <!UNINITIALIZED_PARAMETER!>`_`<!>) {
|
||||
inner class Bar2(x: Exception = `_`) { }
|
||||
}
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -23,7 +23,7 @@ fun foo() {
|
||||
10
|
||||
}
|
||||
fun bar(x: Exception = `_`) {}
|
||||
class Bar(`_`: Exception = `_`) {
|
||||
class Bar(`_`: Exception = <!UNINITIALIZED_PARAMETER!>`_`<!>) {
|
||||
inner class Bar2(x: Exception = `_`) { }
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user