FIR checker: report uninitialized member/extension properties
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
e8028e7825
commit
e009b71f88
Vendored
+4
-4
@@ -159,7 +159,7 @@ class AnonymousInitializers(var a: String, val b: String) {
|
||||
}
|
||||
}
|
||||
|
||||
val o: String
|
||||
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val o: String<!>
|
||||
init {
|
||||
if (1 < 3) {
|
||||
o = "a"
|
||||
@@ -196,7 +196,7 @@ open class Open(a: Int, w: Int) {}
|
||||
|
||||
class LocalValsVsProperties(val a: Int, w: Int) : Open(a, w) {
|
||||
val x : Int
|
||||
val y : Int
|
||||
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val y : Int<!>
|
||||
init {
|
||||
x = 1
|
||||
val b = x
|
||||
@@ -279,7 +279,7 @@ fun foo() {
|
||||
}
|
||||
|
||||
class TestObjectExpression() {
|
||||
val a : Int
|
||||
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val a : Int<!>
|
||||
fun foo() {
|
||||
val a = object {
|
||||
val x : Int
|
||||
@@ -306,7 +306,7 @@ class TestObjectExpression() {
|
||||
|
||||
object TestObjectDeclaration {
|
||||
val x : Int
|
||||
val y : Int
|
||||
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val y : Int<!>
|
||||
init {
|
||||
x = 1
|
||||
}
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ class My {
|
||||
}
|
||||
}
|
||||
|
||||
val top: Int
|
||||
<!MUST_BE_INITIALIZED!>val top: Int<!>
|
||||
|
||||
fun init() {
|
||||
top = 1
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
class A(val next: A? = null) {
|
||||
val x: String
|
||||
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val x: String<!>
|
||||
init {
|
||||
next?.x = "a"
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
class Outer {
|
||||
val outerProp: String
|
||||
<!MUST_BE_INITIALIZED_OR_BE_ABSTRACT!>val outerProp: String<!>
|
||||
inner class Inner(inner: Inner, outer: Outer) {
|
||||
val innerProp: String
|
||||
init {
|
||||
|
||||
Reference in New Issue
Block a user