FIR checker: report uninitialized member/extension properties

This commit is contained in:
Jinseong Jeon
2021-02-23 14:33:44 -08:00
committed by Dmitriy Novozhilov
parent e8028e7825
commit e009b71f88
63 changed files with 487 additions and 230 deletions
@@ -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
}
@@ -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"
}
@@ -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 {