Add warning for initializers with obsolete syntax
Expected 'init' keyword before class initializer
This commit is contained in:
+2
-2
@@ -12,7 +12,7 @@ open class A(val a: A)
|
||||
|
||||
class TestObjectLiteral {
|
||||
val obj: A = object: A(<!UNINITIALIZED_VARIABLE!>obj<!>) {
|
||||
{
|
||||
init {
|
||||
val x = <!UNINITIALIZED_VARIABLE!>obj<!>
|
||||
}
|
||||
fun foo() {
|
||||
@@ -20,7 +20,7 @@ class TestObjectLiteral {
|
||||
}
|
||||
}
|
||||
val obj1: A = @l ( object: A(<!UNINITIALIZED_VARIABLE!>obj1<!>) {
|
||||
{
|
||||
init {
|
||||
val x = <!UNINITIALIZED_VARIABLE!>obj1<!>
|
||||
}
|
||||
fun foo() = obj1
|
||||
|
||||
Reference in New Issue
Block a user