diff --git a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions index c754a9b528c..db36bf06b60 100644 --- a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions +++ b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.instructions @@ -1,6 +1,6 @@ == A == class A { - { + init { x = 1 } val x: Int diff --git a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt index 84574bdd4a6..6abddc6374b 100644 --- a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt +++ b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.kt @@ -1,5 +1,5 @@ class A { - { + init { x = 1 } val x: Int diff --git a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.values b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.values index e1c759fdbd2..963d6c9477d 100644 --- a/compiler/testData/cfg-variables/basic/InitializedNotDeclared.values +++ b/compiler/testData/cfg-variables/basic/InitializedNotDeclared.values @@ -1,6 +1,6 @@ == A == class A { - { + init { x = 1 } val x: Int diff --git a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions index 16562437bce..c75b8127a86 100644 --- a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions +++ b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.instructions @@ -69,7 +69,7 @@ sink: == TestObjectLiteral == class TestObjectLiteral { val obj: A = object: A(obj) { - { + init { val x = obj } fun foo() { @@ -79,29 +79,29 @@ class TestObjectLiteral { } --------------------- L0: - 1 INIT: in: {} out: {} - v(val obj: A = object: A(obj) { { val x = obj } fun foo() { val y = obj } }) INIT: in: {} out: {obj=D} - mark(object: A(obj) { { val x = obj } fun foo() { val y = obj } }) INIT: in: {obj=D} out: {obj=D} + 1 INIT: in: {} out: {} + v(val obj: A = object: A(obj) { init { val x = obj } fun foo() { val y = obj } }) INIT: in: {} out: {obj=D} + mark(object: A(obj) { init { val x = obj } fun foo() { val y = obj } }) INIT: in: {obj=D} out: {obj=D} magic[IMPLICIT_RECEIVER](obj) -> r(obj|) -> mark(A(obj)) call(A(obj), |) -> 2 mark({ val x = obj }) - v(val x = obj) INIT: in: {obj=D} out: {obj=D, x=D} - magic[IMPLICIT_RECEIVER](obj) -> INIT: in: {obj=D, x=D} out: {obj=D, x=D} + v(val x = obj) INIT: in: {obj=D} out: {obj=D, x=D} + magic[IMPLICIT_RECEIVER](obj) -> INIT: in: {obj=D, x=D} out: {obj=D, x=D} r(obj|) -> - w(x|) INIT: in: {obj=D, x=D} out: {obj=D, x=ID} - 1 jmp?(L2) INIT: in: {obj=D} out: {obj=D} - d(fun foo() { val y = obj }) USE: in: {obj=READ} out: {obj=READ} + w(x|) INIT: in: {obj=D, x=D} out: {obj=D, x=ID} + 1 jmp?(L2) INIT: in: {obj=D} out: {obj=D} + d(fun foo() { val y = obj }) USE: in: {obj=READ} out: {obj=READ} L2 [after local declaration]: - r(object: A(obj) { { val x = obj } fun foo() { val y = obj } }) -> - w(obj|) INIT: in: {obj=D} out: {obj=ID} + r(object: A(obj) { init { val x = obj } fun foo() { val y = obj } }) -> + w(obj|) INIT: in: {obj=D} out: {obj=ID} L1: - INIT: in: {obj=ID} out: {obj=ID} + INIT: in: {obj=ID} out: {obj=ID} error: - INIT: in: {} out: {} + INIT: in: {} out: {} sink: - INIT: in: {obj=D} out: {obj=D} USE: in: {} out: {} + INIT: in: {obj=D} out: {obj=D} USE: in: {} out: {} ===================== == foo == fun foo() { @@ -142,4 +142,4 @@ error: INIT: in: {} out: {} sink: INIT: in: {x=ID} out: {x=ID} USE: in: {} out: {} -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt index 52af0fc669e..92ea871109f 100644 --- a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt +++ b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.kt @@ -8,7 +8,7 @@ open class A(val a: A) class TestObjectLiteral { val obj: A = object: A(obj) { - { + init { val x = obj } fun foo() { diff --git a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.values b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.values index a143897cc2b..38dbe45cbd1 100644 --- a/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.values +++ b/compiler/testData/cfg-variables/bugs/referenceToPropertyInitializer.values @@ -31,7 +31,7 @@ open class A(val a: A) == TestObjectLiteral == class TestObjectLiteral { val obj: A = object: A(obj) { - { + init { val x = obj } fun foo() { @@ -40,12 +40,12 @@ class TestObjectLiteral { } } --------------------- - : TestObjectLiteral NEW: magic[IMPLICIT_RECEIVER](obj) -> - : TestObjectLiteral NEW: magic[IMPLICIT_RECEIVER](obj) -> -obj : {<: A} NEW: r(obj|) -> -A(obj) : * NEW: call(A(obj), |) -> -obj : {<: A} NEW: r(obj|) -> -object: A(obj) { { val x = obj } fun foo() { val y = obj } } : {<: A} NEW: r(object: A(obj) { { val x = obj } fun foo() { val y = obj } }) -> + : TestObjectLiteral NEW: magic[IMPLICIT_RECEIVER](obj) -> + : TestObjectLiteral NEW: magic[IMPLICIT_RECEIVER](obj) -> +obj : {<: A} NEW: r(obj|) -> +A(obj) : * NEW: call(A(obj), |) -> +obj : {<: A} NEW: r(obj|) -> +object: A(obj) { init { val x = obj } fun foo() { val y = obj } } : {<: A} NEW: r(object: A(obj) { init { val x = obj } fun foo() { val y = obj } }) -> ===================== == foo == fun foo() { diff --git a/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions b/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions index faa4819f5ab..e5de27fae68 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localClass.instructions @@ -2,7 +2,7 @@ fun foo() { "before" class A(val x: Int) { - { + init { val a = x } fun foo() { @@ -13,29 +13,29 @@ fun foo() { } --------------------- L0: - 1 INIT: in: {} out: {} - 2 mark({ "before" class A(val x: Int) { { val a = x } fun foo() { val b = x } } "after" }) + 1 INIT: in: {} out: {} + 2 mark({ "before" class A(val x: Int) { init { val a = x } fun foo() { val b = x } } "after" }) mark("before") r("before") -> - v(val x: Int) INIT: in: {} out: {x=D} - magic[FAKE_INITIALIZER](val x: Int) -> INIT: in: {x=D} out: {x=D} - w(x|) INIT: in: {x=D} out: {x=ID} - 3 mark({ val a = x }) INIT: in: {x=ID} out: {x=ID} - v(val a = x) INIT: in: {x=ID} out: {a=D, x=ID} - magic[IMPLICIT_RECEIVER](x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} + v(val x: Int) INIT: in: {} out: {x=D} + magic[FAKE_INITIALIZER](val x: Int) -> INIT: in: {x=D} out: {x=D} + w(x|) INIT: in: {x=D} out: {x=ID} + 3 mark({ val a = x }) INIT: in: {x=ID} out: {x=ID} + v(val a = x) INIT: in: {x=ID} out: {a=D, x=ID} + magic[IMPLICIT_RECEIVER](x) -> INIT: in: {a=D, x=ID} out: {a=D, x=ID} r(x|) -> - w(a|) INIT: in: {a=D, x=ID} out: {a=ID, x=ID} - 2 jmp?(L2) INIT: in: {x=ID} out: {x=ID} - d(fun foo() { val b = x }) USE: in: {x=READ} out: {x=READ} + w(a|) INIT: in: {a=D, x=ID} out: {a=ID, x=ID} + 2 jmp?(L2) INIT: in: {x=ID} out: {x=ID} + d(fun foo() { val b = x }) USE: in: {x=READ} out: {x=READ} L2 [after local declaration]: mark("after") r("after") -> L1: - 1 INIT: in: {} out: {} + 1 INIT: in: {} out: {} error: sink: - USE: in: {} out: {} + USE: in: {} out: {} ===================== == foo == fun foo() { @@ -55,4 +55,4 @@ error: sink: USE: in: {} out: {} -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/localClass.kt b/compiler/testData/cfg-variables/lexicalScopes/localClass.kt index fa933c2c7e1..3d58fa10064 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localClass.kt +++ b/compiler/testData/cfg-variables/lexicalScopes/localClass.kt @@ -1,7 +1,7 @@ fun foo() { "before" class A(val x: Int) { - { + init { val a = x } fun foo() { diff --git a/compiler/testData/cfg-variables/lexicalScopes/localClass.values b/compiler/testData/cfg-variables/lexicalScopes/localClass.values index 0bbe02c2ee8..782f8cbd48a 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localClass.values +++ b/compiler/testData/cfg-variables/lexicalScopes/localClass.values @@ -2,7 +2,7 @@ fun foo() { "before" class A(val x: Int) { - { + init { val a = x } fun foo() { @@ -12,12 +12,12 @@ fun foo() { "after" } --------------------- - : Int NEW: magic[FAKE_INITIALIZER](val x: Int) -> - : A NEW: magic[IMPLICIT_RECEIVER](x) -> -"before" : * NEW: r("before") -> -x : Int NEW: r(x|) -> -"after" : * NEW: r("after") -> -{ "before" class A(val x: Int) { { val a = x } fun foo() { val b = x } } "after" } : * COPY + : Int NEW: magic[FAKE_INITIALIZER](val x: Int) -> + : A NEW: magic[IMPLICIT_RECEIVER](x) -> +"before" : * NEW: r("before") -> +x : Int NEW: r(x|) -> +"after" : * NEW: r("after") -> +{ "before" class A(val x: Int) { init { val a = x } fun foo() { val b = x } } "after" } : * COPY ===================== == foo == fun foo() { diff --git a/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions b/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions index 58c888b158a..9d8f9fbecd0 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/localObject.instructions @@ -2,7 +2,7 @@ fun foo() { "before" object A { - { + init { val a = 1 } fun foo() { @@ -13,15 +13,15 @@ fun foo() { } --------------------- L0: - 1 INIT: in: {} out: {} - 2 mark({ "before" object A { { val a = 1 } fun foo() { val b = 2 } } "after" }) + 1 INIT: in: {} out: {} + 2 mark({ "before" object A { init { val a = 1 } fun foo() { val b = 2 } } "after" }) mark("before") r("before") -> 3 mark({ val a = 1 }) - v(val a = 1) INIT: in: {} out: {a=D} - r(1) -> INIT: in: {a=D} out: {a=D} - w(a|) INIT: in: {a=D} out: {a=ID} - 2 jmp?(L2) INIT: in: {} out: {} + v(val a = 1) INIT: in: {} out: {a=D} + r(1) -> INIT: in: {a=D} out: {a=D} + w(a|) INIT: in: {a=D} out: {a=ID} + 2 jmp?(L2) INIT: in: {} out: {} d(fun foo() { val b = 2 }) L2 [after local declaration]: mark("after") @@ -31,7 +31,7 @@ L1: error: sink: - USE: in: {} out: {} + USE: in: {} out: {} ===================== == foo == fun foo() { @@ -50,4 +50,4 @@ error: sink: USE: in: {} out: {} -===================== \ No newline at end of file +===================== diff --git a/compiler/testData/cfg-variables/lexicalScopes/localObject.kt b/compiler/testData/cfg-variables/lexicalScopes/localObject.kt index 5e7152e2ac7..edaa08e706f 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localObject.kt +++ b/compiler/testData/cfg-variables/lexicalScopes/localObject.kt @@ -1,7 +1,7 @@ fun foo() { "before" object A { - { + init { val a = 1 } fun foo() { diff --git a/compiler/testData/cfg-variables/lexicalScopes/localObject.values b/compiler/testData/cfg-variables/lexicalScopes/localObject.values index f1d5201cf33..41f38942ad2 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/localObject.values +++ b/compiler/testData/cfg-variables/lexicalScopes/localObject.values @@ -2,7 +2,7 @@ fun foo() { "before" object A { - { + init { val a = 1 } fun foo() { @@ -12,10 +12,10 @@ fun foo() { "after" } --------------------- -"before" : * NEW: r("before") -> -1 : Int NEW: r(1) -> -"after" : * NEW: r("after") -> -{ "before" object A { { val a = 1 } fun foo() { val b = 2 } } "after" } : * COPY +"before" : * NEW: r("before") -> +1 : Int NEW: r(1) -> +"after" : * NEW: r("after") -> +{ "before" object A { init { val a = 1 } fun foo() { val b = 2 } } "after" } : * COPY ===================== == foo == fun foo() { diff --git a/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.instructions b/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.instructions index d4dfc6ebf1d..12dd55250b3 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.instructions +++ b/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.instructions @@ -2,7 +2,7 @@ fun foo() { "before" val bar = object { - { + init { val x = 1 } fun foo() { @@ -13,29 +13,29 @@ fun foo() { } --------------------- L0: - 1 INIT: in: {} out: {} - 2 mark({ "before" val bar = object { { val x = 1 } fun foo() { val a = 2 } } "after" }) + 1 INIT: in: {} out: {} + 2 mark({ "before" val bar = object { init { val x = 1 } fun foo() { val a = 2 } } "after" }) mark("before") r("before") -> - v(val bar = object { { val x = 1 } fun foo() { val a = 2 } }) INIT: in: {} out: {bar=D} - mark(object { { val x = 1 } fun foo() { val a = 2 } }) INIT: in: {bar=D} out: {bar=D} + v(val bar = object { init { val x = 1 } fun foo() { val a = 2 } }) INIT: in: {} out: {bar=D} + mark(object { init { val x = 1 } fun foo() { val a = 2 } }) INIT: in: {bar=D} out: {bar=D} 3 mark({ val x = 1 }) - v(val x = 1) INIT: in: {bar=D} out: {bar=D, x=D} - r(1) -> INIT: in: {bar=D, x=D} out: {bar=D, x=D} - w(x|) INIT: in: {bar=D, x=D} out: {bar=D, x=ID} - 2 jmp?(L2) INIT: in: {bar=D} out: {bar=D} + v(val x = 1) INIT: in: {bar=D} out: {bar=D, x=D} + r(1) -> INIT: in: {bar=D, x=D} out: {bar=D, x=D} + w(x|) INIT: in: {bar=D, x=D} out: {bar=D, x=ID} + 2 jmp?(L2) INIT: in: {bar=D} out: {bar=D} d(fun foo() { val a = 2 }) L2 [after local declaration]: - r(object { { val x = 1 } fun foo() { val a = 2 } }) -> - w(bar|) INIT: in: {bar=D} out: {bar=ID} - mark("after") INIT: in: {bar=ID} out: {bar=ID} + r(object { init { val x = 1 } fun foo() { val a = 2 } }) -> + w(bar|) INIT: in: {bar=D} out: {bar=ID} + mark("after") INIT: in: {bar=ID} out: {bar=ID} r("after") -> L1: - 1 INIT: in: {} out: {} + 1 INIT: in: {} out: {} error: sink: - USE: in: {} out: {} + USE: in: {} out: {} ===================== == foo == fun foo() { diff --git a/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt b/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt index b1cb19aa815..8cc45fcab0c 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt +++ b/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.kt @@ -1,7 +1,7 @@ fun foo() { "before" val bar = object { - { + init { val x = 1 } fun foo() { diff --git a/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.values b/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.values index d27c79aa726..28b36af2d1e 100644 --- a/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.values +++ b/compiler/testData/cfg-variables/lexicalScopes/objectLiteralScope.values @@ -2,7 +2,7 @@ fun foo() { "before" val bar = object { - { + init { val x = 1 } fun foo() { @@ -12,11 +12,11 @@ fun foo() { "after" } --------------------- -"before" : * NEW: r("before") -> -1 : Int NEW: r(1) -> -object { { val x = 1 } fun foo() { val a = 2 } } : NEW: r(object { { val x = 1 } fun foo() { val a = 2 } }) -> -"after" : * NEW: r("after") -> -{ "before" val bar = object { { val x = 1 } fun foo() { val a = 2 } } "after" } : * COPY +"before" : * NEW: r("before") -> +1 : Int NEW: r(1) -> +object { init { val x = 1 } fun foo() { val a = 2 } } : NEW: r(object { init { val x = 1 } fun foo() { val a = 2 } }) -> +"after" : * NEW: r("after") -> +{ "before" val bar = object { init { val x = 1 } fun foo() { val a = 2 } } "after" } : * COPY ===================== == foo == fun foo() { diff --git a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions index 6e89c5fb0a8..731150fbbd1 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions +++ b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.instructions @@ -3,14 +3,14 @@ class AnonymousInitializers() { val k = 34 val i: Int - { + init { $i = 12 } val j: Int get() = 20 - { + init { $i = 13 } } diff --git a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt index 7971b9991a8..3b7036bf5dd 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt +++ b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.kt @@ -2,14 +2,14 @@ class AnonymousInitializers() { val k = 34 val i: Int - { + init { $i = 12 } val j: Int get() = 20 - { + init { $i = 13 } } \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.values b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.values index c777cf4c0fb..e477db295d3 100644 --- a/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.values +++ b/compiler/testData/cfg/declarations/classesAndObjects/AnonymousInitializers.values @@ -3,14 +3,14 @@ class AnonymousInitializers() { val k = 34 val i: Int - { + init { $i = 12 } val j: Int get() = 20 - { + init { $i = 13 } } diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions b/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions index 55533707c0c..77dca2d6b24 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.instructions @@ -5,7 +5,7 @@ class C() { companion object { val x : Int - { + init { $x = 1 } @@ -50,7 +50,7 @@ sink: fun test1() { val a = object { val x : Int - { + init { $x = 1 } } @@ -58,27 +58,27 @@ fun test1() { --------------------- L0: 1 - 2 mark({ val a = object { val x : Int { $x = 1 } } }) - v(val a = object { val x : Int { $x = 1 } }) - mark(object { val x : Int { $x = 1 } }) + 2 mark({ val a = object { val x : Int init { $x = 1 } } }) + v(val a = object { val x : Int init { $x = 1 } }) + mark(object { val x : Int init { $x = 1 } }) v(val x : Int) 3 mark({ $x = 1 }) magic[IMPLICIT_RECEIVER]($x) -> r(1) -> w($x|, ) - 2 r(object { val x : Int { $x = 1 } }) -> + 2 r(object { val x : Int init { $x = 1 } }) -> w(a|) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, ] + PREV:[, ] ===================== == O == object O { val x : Int - { + init { $x = 1 } } @@ -176,7 +176,7 @@ fun test4() { val a = object { val x : Int val y : Int - { + init { $x = 1 } fun ggg() { @@ -187,26 +187,26 @@ fun test4() { --------------------- L0: 1 - 2 mark({ val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } } }) - v(val a = object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) - mark(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) + 2 mark({ val a = object { val x : Int val y : Int init { $x = 1 } fun ggg() { y = 10 } } }) + v(val a = object { val x : Int val y : Int init { $x = 1 } fun ggg() { y = 10 } }) + mark(object { val x : Int val y : Int init { $x = 1 } fun ggg() { y = 10 } }) v(val x : Int) v(val y : Int) 3 mark({ $x = 1 }) magic[IMPLICIT_RECEIVER]($x) -> r(1) -> w($x|, ) - 2 jmp?(L2) NEXT:[r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> , d(fun ggg() { y = 10 })] - d(fun ggg() { y = 10 }) NEXT:[] + 2 jmp?(L2) NEXT:[r(object { val x : Int val y : Int init { $x = 1 } fun ggg() { y = 10 } }) -> , d(fun ggg() { y = 10 })] + d(fun ggg() { y = 10 }) NEXT:[] L2 [after local declaration]: - r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> PREV:[jmp?(L2)] + r(object { val x : Int val y : Int init { $x = 1 } fun ggg() { y = 10 } }) -> PREV:[jmp?(L2)] w(a|) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, , d(fun ggg() { y = 10 })] + PREV:[, , d(fun ggg() { y = 10 })] ===================== == ggg == fun ggg() { @@ -230,7 +230,7 @@ sink: fun test5() { val a = object { var x = 1 - { + init { $x = 2 } fun foo() { @@ -244,9 +244,9 @@ fun test5() { --------------------- L0: 1 - 2 mark({ val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } }) - v(val a = object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) - mark(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) + 2 mark({ val a = object { var x = 1 init { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } }) + v(val a = object { var x = 1 init { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) + mark(object { var x = 1 init { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) v(var x = 1) r(1) -> w(x|) @@ -254,20 +254,20 @@ L0: magic[IMPLICIT_RECEIVER]($x) -> r(2) -> w($x|, ) - 2 jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })] - d(fun foo() { x = 3 }) NEXT:[] + 2 jmp?(L2) NEXT:[jmp?(L5), d(fun foo() { x = 3 })] + d(fun foo() { x = 3 }) NEXT:[] L2 [after local declaration]: - jmp?(L5) NEXT:[r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> , d(fun bar() { x = 4 })] PREV:[jmp?(L2)] - d(fun bar() { x = 4 }) NEXT:[] + jmp?(L5) NEXT:[r(object { var x = 1 init { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> , d(fun bar() { x = 4 })] PREV:[jmp?(L2)] + d(fun bar() { x = 4 }) NEXT:[] L5 [after local declaration]: - r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> PREV:[jmp?(L5)] + r(object { var x = 1 init { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> PREV:[jmp?(L5)] w(a|) L1: - 1 NEXT:[] + 1 NEXT:[] error: - PREV:[] + PREV:[] sink: - PREV:[, , d(fun foo() { x = 3 }), d(fun bar() { x = 4 })] + PREV:[, , d(fun foo() { x = 3 }), d(fun bar() { x = 4 })] ===================== == foo == fun foo() { diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.kt b/compiler/testData/cfg/declarations/local/LocalDeclarations.kt index 9dd36f3687d..bc51d8ae40c 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.kt +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.kt @@ -4,7 +4,7 @@ class C() { companion object { val x : Int - { + init { $x = 1 } @@ -21,7 +21,7 @@ fun doSmth(i: Int) {} fun test1() { val a = object { val x : Int - { + init { $x = 1 } } @@ -29,7 +29,7 @@ fun test1() { object O { val x : Int - { + init { $x = 1 } } @@ -52,7 +52,7 @@ fun test4() { val a = object { val x : Int val y : Int - { + init { $x = 1 } fun ggg() { @@ -64,7 +64,7 @@ fun test4() { fun test5() { val a = object { var x = 1 - { + init { $x = 2 } fun foo() { diff --git a/compiler/testData/cfg/declarations/local/LocalDeclarations.values b/compiler/testData/cfg/declarations/local/LocalDeclarations.values index 56bc3874f8f..a2b655ecff1 100644 --- a/compiler/testData/cfg/declarations/local/LocalDeclarations.values +++ b/compiler/testData/cfg/declarations/local/LocalDeclarations.values @@ -5,7 +5,7 @@ class C() { companion object { val x : Int - { + init { $x = 1 } @@ -28,22 +28,22 @@ fun doSmth(i: Int) {} fun test1() { val a = object { val x : Int - { + init { $x = 1 } } } --------------------- - : NEW: magic[IMPLICIT_RECEIVER]($x) -> -1 : Int NEW: r(1) -> -$x = 1 !: * -{ $x = 1 } !: * COPY -object { val x : Int { $x = 1 } } : NEW: r(object { val x : Int { $x = 1 } }) -> + : NEW: magic[IMPLICIT_RECEIVER]($x) -> +1 : Int NEW: r(1) -> +$x = 1 !: * +{ $x = 1 } !: * COPY +object { val x : Int init { $x = 1 } } : NEW: r(object { val x : Int init { $x = 1 } }) -> ===================== == O == object O { val x : Int - { + init { $x = 1 } } @@ -92,7 +92,7 @@ fun test4() { val a = object { val x : Int val y : Int - { + init { $x = 1 } fun ggg() { @@ -101,11 +101,11 @@ fun test4() { } } --------------------- - : NEW: magic[IMPLICIT_RECEIVER]($x) -> -1 : Int NEW: r(1) -> -$x = 1 !: * -{ $x = 1 } !: * COPY -object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } } : NEW: r(object { val x : Int val y : Int { $x = 1 } fun ggg() { y = 10 } }) -> + : NEW: magic[IMPLICIT_RECEIVER]($x) -> +1 : Int NEW: r(1) -> +$x = 1 !: * +{ $x = 1 } !: * COPY +object { val x : Int val y : Int init { $x = 1 } fun ggg() { y = 10 } } : NEW: r(object { val x : Int val y : Int init { $x = 1 } fun ggg() { y = 10 } }) -> ===================== == ggg == fun ggg() { @@ -121,7 +121,7 @@ y = 10 !: * fun test5() { val a = object { var x = 1 - { + init { $x = 2 } fun foo() { @@ -133,12 +133,12 @@ fun test5() { } } --------------------- - : NEW: magic[IMPLICIT_RECEIVER]($x) -> -1 : Int NEW: r(1) -> -2 : Int NEW: r(2) -> -$x = 2 !: * -{ $x = 2 } !: * COPY -object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } : NEW: r(object { var x = 1 { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> + : NEW: magic[IMPLICIT_RECEIVER]($x) -> +1 : Int NEW: r(1) -> +2 : Int NEW: r(2) -> +$x = 2 !: * +{ $x = 2 } !: * COPY +object { var x = 1 init { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } } : NEW: r(object { var x = 1 init { $x = 2 } fun foo() { x = 3 } fun bar() { x = 4 } }) -> ===================== == foo == fun foo() { diff --git a/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions b/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions index e4bca8ff7dd..034a9d9a66d 100644 --- a/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions +++ b/compiler/testData/cfg/declarations/properties/backingFieldAccess.instructions @@ -3,7 +3,7 @@ class C { val a: Int get() = 1 - { + init { $a } } diff --git a/compiler/testData/cfg/declarations/properties/backingFieldAccess.kt b/compiler/testData/cfg/declarations/properties/backingFieldAccess.kt index 7923cd2046f..d1a3d87a7a4 100644 --- a/compiler/testData/cfg/declarations/properties/backingFieldAccess.kt +++ b/compiler/testData/cfg/declarations/properties/backingFieldAccess.kt @@ -2,7 +2,7 @@ class C { val a: Int get() = 1 - { + init { $a } } \ No newline at end of file diff --git a/compiler/testData/cfg/declarations/properties/backingFieldAccess.values b/compiler/testData/cfg/declarations/properties/backingFieldAccess.values index c84bbf62ebb..431ec3f8c21 100644 --- a/compiler/testData/cfg/declarations/properties/backingFieldAccess.values +++ b/compiler/testData/cfg/declarations/properties/backingFieldAccess.values @@ -3,7 +3,7 @@ class C { val a: Int get() = 1 - { + init { $a } } diff --git a/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions b/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions index 91600c55f86..cd67077f18d 100644 --- a/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions +++ b/compiler/testData/cfg/expressions/chainedQualifiedExpression.instructions @@ -12,7 +12,7 @@ sink: ===================== == JetKeywordCompletionContributor == public open class JetKeywordCompletionContributor() { - { + init { val inTopLevel = 1.0 BunchKeywordRegister() diff --git a/compiler/testData/cfg/expressions/chainedQualifiedExpression.kt b/compiler/testData/cfg/expressions/chainedQualifiedExpression.kt index 56d1c42f1b8..ca621ca165c 100644 --- a/compiler/testData/cfg/expressions/chainedQualifiedExpression.kt +++ b/compiler/testData/cfg/expressions/chainedQualifiedExpression.kt @@ -3,7 +3,7 @@ package test class JetToken public open class JetKeywordCompletionContributor() { - { + init { val inTopLevel = 1.0 BunchKeywordRegister() diff --git a/compiler/testData/cfg/expressions/chainedQualifiedExpression.values b/compiler/testData/cfg/expressions/chainedQualifiedExpression.values index 230c48e7f42..c6ce70eaf58 100644 --- a/compiler/testData/cfg/expressions/chainedQualifiedExpression.values +++ b/compiler/testData/cfg/expressions/chainedQualifiedExpression.values @@ -4,7 +4,7 @@ class JetToken ===================== == JetKeywordCompletionContributor == public open class JetKeywordCompletionContributor() { - { + init { val inTopLevel = 1.0 BunchKeywordRegister() diff --git a/compiler/testData/resolve/Basic.resolve b/compiler/testData/resolve/Basic.resolve index 74f3a8c647a..5eba0a18ca2 100644 --- a/compiler/testData/resolve/Basic.resolve +++ b/compiler/testData/resolve/Basic.resolve @@ -6,7 +6,7 @@ ~foo~fun foo(~foo.a~a : `kotlin::Char`Char) = `foo.a`a`:kotlin::Char` ~fooB~fun fooB() = `foo`foo('1')`:kotlin::Char` ~foo.1~fun foo() : Int = (1.`kotlin::Int.plus(Int)`plus(1))`:kotlin::Int` - ~foo1~fun foo1() : `B`B = `B`B()`:B` + ~foo91~fun foo1() : `B`B = `B`B()`:B` ~A.a~val a : `kotlin::Int`Int } diff --git a/compiler/testData/resolve/Objects.resolve b/compiler/testData/resolve/Objects.resolve index a9d0f43b73c..c543cba55de 100644 --- a/compiler/testData/resolve/Objects.resolve +++ b/compiler/testData/resolve/Objects.resolve @@ -18,7 +18,7 @@ object B : A {} fun f() { ~y~val y = object : Foo(`ns.x`x) { - { + init { `ns.x`x + 12 } diff --git a/compiler/testData/resolve/PrimaryConstructorParameters.resolve b/compiler/testData/resolve/PrimaryConstructorParameters.resolve index 2d398d0acdd..513fea4c202 100644 --- a/compiler/testData/resolve/PrimaryConstructorParameters.resolve +++ b/compiler/testData/resolve/PrimaryConstructorParameters.resolve @@ -6,7 +6,7 @@ class C(~x~x : Int, ~y~val y : Int) : Base(`x`x /*parameter*/), Base1 by Base1(` var zy = `y`y // parameter get() = `y`y // property - { + init { val wx = `x`x val wy = `y`y } diff --git a/compiler/testData/resolve/PrimaryConstructors.resolve b/compiler/testData/resolve/PrimaryConstructors.resolve index 74a50a58f68..b6271480e0e 100644 --- a/compiler/testData/resolve/PrimaryConstructors.resolve +++ b/compiler/testData/resolve/PrimaryConstructors.resolve @@ -11,7 +11,7 @@ fun test() { } class Foo(~bar~var bar : Int, ~barr~barr : Int, ~barrr~val barrr : Int) { - { + init { `bar`bar = 1 `barr`barr = 1 `barrr`barrr = 1 diff --git a/idea/idea-completion/testData/basic/common/InClassInitializer.kt b/idea/idea-completion/testData/basic/common/InClassInitializer.kt index 8ae9a21e7df..aa03e6353cc 100644 --- a/idea/idea-completion/testData/basic/common/InClassInitializer.kt +++ b/idea/idea-completion/testData/basic/common/InClassInitializer.kt @@ -3,7 +3,7 @@ val testExternal class Some(testParam : Int) { private val myVal : Int - { + init { val testing = 12 myVal = test } diff --git a/idea/idea-completion/testData/basic/common/InFunInClassInitializer.kt b/idea/idea-completion/testData/basic/common/InFunInClassInitializer.kt index bbe187f97e4..35b1132ef5f 100644 --- a/idea/idea-completion/testData/basic/common/InFunInClassInitializer.kt +++ b/idea/idea-completion/testData/basic/common/InFunInClassInitializer.kt @@ -1,6 +1,6 @@ val some = 12 class Some(someParam : Int) { - { + init { fun internalFun(someInternal : Int) : Int { return some } diff --git a/idea/idea-completion/testData/basic/common/InInitializerInPropertyAccessor.kt b/idea/idea-completion/testData/basic/common/InInitializerInPropertyAccessor.kt index ca9fd584673..df190addc69 100644 --- a/idea/idea-completion/testData/basic/common/InInitializerInPropertyAccessor.kt +++ b/idea/idea-completion/testData/basic/common/InInitializerInPropertyAccessor.kt @@ -2,7 +2,7 @@ val testGlobal = 12 val test : Int get() { class SomeMore(testParam : Int) { - { + init { tes } } diff --git a/idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructor.kt b/idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructor.kt index 77420aed5fe..29ca652d697 100644 --- a/idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructor.kt +++ b/idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructor.kt @@ -3,7 +3,7 @@ class A { private fun foo(): I = null!! - { + init { } } diff --git a/idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructorWithThis.kt b/idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructorWithThis.kt index 89a0c5c10a7..380eac31726 100644 --- a/idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructorWithThis.kt +++ b/idea/idea-completion/testData/basic/common/visibility/VisibilityPrivateToThisInConstructorWithThis.kt @@ -3,7 +3,7 @@ class A { private fun foo(): I = null!! - { + init { this. } } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt index 34b539f5c7a..5534a77b4d9 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt @@ -5,7 +5,7 @@ class A { class B { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt.after index 6cce219cee8..56a6fa0860e 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer1.kt.after @@ -1,7 +1,7 @@ // MOVE: down // class A class A { - { + init { } // class B diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt index 154f982c56d..9311ec4a9b8 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt @@ -1,7 +1,7 @@ // MOVE: up // class A class A { - { + init { } // class B diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt.after index e6ff78547fa..6cd68028dbb 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/class/classAtClassInitializer2.kt.after @@ -5,7 +5,7 @@ class A { class B { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace1.kt index 2c6164d0151..5e12a9a74f6 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace1.kt @@ -1,7 +1,7 @@ // MOVE: down // IS_APPLICABLE: false class B { - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace2.kt index d7618556f6d..b847612907a 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtBrace2.kt @@ -1,7 +1,7 @@ // MOVE: up // IS_APPLICABLE: false class B { - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt index 9018b8dec8b..d3cd8e3486e 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt @@ -1,6 +1,6 @@ // MOVE: down class A { - { + init { } class B { diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt.after index d73569a6ee8..71f56d14fef 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass1.kt.after @@ -1,7 +1,7 @@ // MOVE: down class A { class B { - { + init { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt index 8b4afc7fcee..6c437776845 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt @@ -3,7 +3,7 @@ class A { class B { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt.after index 2adf3bd6994..05714100cd0 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClass2.kt.after @@ -2,7 +2,7 @@ class A { class B { - { + init { } } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt index 4aa8284a1e5..76e9953ee4f 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt @@ -1,9 +1,9 @@ // MOVE: down class A { - { + init { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt.after index 19f70a7a811..4a116a9ab85 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer1.kt.after @@ -1,9 +1,9 @@ // MOVE: down class A { - { + init { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt index 1f4c19053ca..3b4fabd203f 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt @@ -1,9 +1,9 @@ // MOVE: up class A { - { + init { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt.after index e4331ac665d..47663965f40 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtClassInitializer2.kt.after @@ -1,9 +1,9 @@ // MOVE: up class A { - { + init { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt index 24c23194614..bbc178acfa2 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt @@ -1,6 +1,6 @@ // MOVE: down class A { - { + init { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt.after index 7bf43a8bc70..73fbfd5ec14 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine1.kt.after @@ -2,7 +2,7 @@ class A { val y = "" - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt index 0db82eeed0a..89f92231dca 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt @@ -2,7 +2,7 @@ class A { val x = "" - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt.after index 26c68820d05..40625211885 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtEmptyLine2.kt.after @@ -1,6 +1,6 @@ // MOVE: up class A { - { + init { } diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt index 320823670f7..32dc73fca7c 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt @@ -1,6 +1,6 @@ // MOVE: down class A { - { + init { } fun foo() { diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt.after index 8f1498c5712..fa26e5ce9a0 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction1.kt.after @@ -3,7 +3,7 @@ class A { fun foo() { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt index b760f2b323f..785414deb58 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt @@ -3,7 +3,7 @@ class A { fun foo() { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt.after index 14466daa282..75c53e07fac 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtFunction2.kt.after @@ -1,6 +1,6 @@ // MOVE: up class A { - { + init { } fun foo() { diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt index 311bfea21c7..c40eaa670a1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt @@ -1,6 +1,6 @@ // MOVE: down class A { - { + init { } val y = "" diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt.after index 33e1b63aea3..960774a523d 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty1.kt.after @@ -1,7 +1,7 @@ // MOVE: down class A { val y = "" - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt index edc47ba9a63..07647dbcda1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt @@ -1,7 +1,7 @@ // MOVE: up class A { val y = "" - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt.after index 639531d527e..e552551968e 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/classInitializer/classInitializerAtProperty2.kt.after @@ -1,6 +1,6 @@ // MOVE: up class A { - { + init { } val y = "" diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt index b5a4865304e..083dc283bec 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt @@ -5,7 +5,7 @@ class A { fun foo() { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt.after index e6d0daf2a8a..efef3b0549d 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer1.kt.after @@ -1,7 +1,7 @@ // MOVE: down // class A class A { - { + init { } // fun foo diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt index 9844046546a..f96f514b442 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt @@ -1,7 +1,7 @@ // MOVE: up // class A class A { - { + init { } // fun foo diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt.after index dbffada6881..ce042483c82 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/function/functionAtClassInitializer2.kt.after @@ -5,7 +5,7 @@ class A { fun foo() { } - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt index e1b4839ce91..d410dc06298 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt @@ -3,7 +3,7 @@ class A { // val x val x = "" - { + init { } } \ No newline at end of file diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt.after index 9c14d4fdfd5..59d81a15bf7 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer1.kt.after @@ -1,7 +1,7 @@ // MOVE: down // class A class A { - { + init { } // val x diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt index 0d5fbd16b57..8ad52b3f4f1 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt @@ -1,7 +1,7 @@ // MOVE: up // class A class A { - { + init { } // val x diff --git a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt.after b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt.after index 1b1a41c6711..b36d04ca331 100644 --- a/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt.after +++ b/idea/testData/codeInsight/moveUpDown/classBodyDeclarations/property/propertyAtClassInitializer2.kt.after @@ -3,7 +3,7 @@ class A { // val x val x = "" - { + init { } } \ No newline at end of file diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.1.kt index 38d26036e9f..48769c9c984 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassAllUsages.1.kt @@ -2,7 +2,7 @@ public class X(bar: String? = A.BAR): A() { var next: A? = A() val myBar: String? = A.BAR - { + init { A.BAR = "" A.foos() } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.1.kt index 38d26036e9f..48769c9c984 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassFieldsUsages.1.kt @@ -2,7 +2,7 @@ public class X(bar: String? = A.BAR): A() { var next: A? = A() val myBar: String? = A.BAR - { + init { A.BAR = "" A.foos() } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.1.kt index 38d26036e9f..48769c9c984 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassMethodsUsages.1.kt @@ -2,7 +2,7 @@ public class X(bar: String? = A.BAR): A() { var next: A? = A() val myBar: String? = A.BAR - { + init { A.BAR = "" A.foos() } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.1.kt index 38d26036e9f..48769c9c984 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKClassWithImplicitConstructorAllUsages.1.kt @@ -2,7 +2,7 @@ public class X(bar: String? = A.BAR): A() { var next: A? = A() val myBar: String? = A.BAR - { + init { A.BAR = "" A.foos() } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKInnerClassAllUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKInnerClassAllUsages.1.kt index 3334f6eada5..02560d3fb4d 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKInnerClassAllUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKInnerClassAllUsages.1.kt @@ -3,7 +3,7 @@ public class KOuter: Outer() { var next: Outer.A? = (this@KOuter : Outer).A() val myBar: String? = (this@KOuter : Outer).A().bar - { + init { (this@KOuter : Outer).A().bar = "" } diff --git a/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.1.kt b/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.1.kt index bccd7f8afac..21c48ded18f 100644 --- a/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.1.kt +++ b/idea/testData/findUsages/java/findJavaClassUsages/JKNestedClassAllUsages.1.kt @@ -2,7 +2,7 @@ public class X(bar: String? = Outer.A.BAR): Outer.A() { var next: Outer.A? = Outer.A() val myBar: String? = Outer.A.BAR - { + init { Outer.A.BAR = "" Outer.A.foos() } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.1.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.1.kt index 1740a96a731..f0cda7c25dc 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.1.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinDeeplyNestedClassAllUsages.1.kt @@ -6,7 +6,7 @@ public class X(bar: String? = Inner.A.bar): Inner.A() { var next: Inner.A? = Inner.A() val myBar: String? = Inner.A.bar - { + init { Inner.A.bar = "" Inner.A.foo() } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinInnerClassAllUsages.1.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinInnerClassAllUsages.1.kt index ab16c2a51cc..3060cb56b7c 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinInnerClassAllUsages.1.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinInnerClassAllUsages.1.kt @@ -7,7 +7,7 @@ public class KOuter: Outer() { var next: Outer.A? = (this@KOuter : Outer).A() val myBar: String? = (this@KOuter : Outer).A().bar - { + init { (this@KOuter : Outer).A().bar = "" } diff --git a/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.1.kt b/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.1.kt index 7f502ea3383..f8a7bc92f50 100644 --- a/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.1.kt +++ b/idea/testData/findUsages/kotlin/findClassUsages/kotlinNestedClassAllUsages.1.kt @@ -6,7 +6,7 @@ public class X(bar: String? = Outer.A.bar): Outer.A() { var next: Outer.A? = Outer.A() val myBar: String? = Outer.A.bar - { + init { Outer.A.bar = "" Outer.A.foo() } diff --git a/idea/testData/findUsages/kotlin/findFunctionUsages/enumFunctionUsages.0.kt b/idea/testData/findUsages/kotlin/findFunctionUsages/enumFunctionUsages.0.kt index ae330dfab65..a10157badd7 100644 --- a/idea/testData/findUsages/kotlin/findFunctionUsages/enumFunctionUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findFunctionUsages/enumFunctionUsages.0.kt @@ -1,7 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.JetNamedFunction // OPTIONS: usages enum class E { - { + init { foo(1) } @@ -9,14 +9,14 @@ enum class E { O A { - { + init { foo(1) } override fun foo(n: Int): Int = n + 1 } B { - { + init { foo(1) } diff --git a/idea/testData/findUsages/kotlin/findParameterUsages/kotlinConstructorParameterUsages.0.kt b/idea/testData/findUsages/kotlin/findParameterUsages/kotlinConstructorParameterUsages.0.kt index 8933e258c01..da4104add54 100644 --- a/idea/testData/findUsages/kotlin/findParameterUsages/kotlinConstructorParameterUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findParameterUsages/kotlinConstructorParameterUsages.0.kt @@ -1,7 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.JetParameter // OPTIONS: usages open class A(foo: T) { - { + init { println(foo) } diff --git a/idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinClassTypeParameterUsages.0.kt b/idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinClassTypeParameterUsages.0.kt index 06bfb4c0661..bffb0bd1cd1 100644 --- a/idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinClassTypeParameterUsages.0.kt +++ b/idea/testData/findUsages/kotlin/findTypeParameterUsages/kotlinClassTypeParameterUsages.0.kt @@ -1,7 +1,7 @@ // PSI_ELEMENT: org.jetbrains.kotlin.psi.JetTypeParameter // OPTIONS: usages open class A<T>(foo: T, list: List) { - { + init { fun T.bar() {} foo.bar() diff --git a/idea/testData/formatter/AnonymousInitializers.after.kt b/idea/testData/formatter/AnonymousInitializers.after.kt index 68581757fd8..06561d45d08 100644 --- a/idea/testData/formatter/AnonymousInitializers.after.kt +++ b/idea/testData/formatter/AnonymousInitializers.after.kt @@ -1,12 +1,6 @@ annotation class Ann class A { - { - } - - { - } - - { + init { } fun foo1() { @@ -34,7 +28,7 @@ class A { } - { + init { } constructor() { diff --git a/idea/testData/formatter/AnonymousInitializers.kt b/idea/testData/formatter/AnonymousInitializers.kt index 2af48201c0a..c920d3686cc 100644 --- a/idea/testData/formatter/AnonymousInitializers.kt +++ b/idea/testData/formatter/AnonymousInitializers.kt @@ -1,6 +1,6 @@ annotation class Ann class A { - {}{}{} + init{} fun foo1() { } @@ -18,7 +18,7 @@ class A { } - {} + init {} constructor() { diff --git a/idea/testData/formatter/AnonymousInitializersLineBreak.after.inv.kt b/idea/testData/formatter/AnonymousInitializersLineBreak.after.inv.kt index 111f4d75ebb..c44f8a33c48 100644 --- a/idea/testData/formatter/AnonymousInitializersLineBreak.after.inv.kt +++ b/idea/testData/formatter/AnonymousInitializersLineBreak.after.inv.kt @@ -1,11 +1,5 @@ annotation class Ann class A { - { - } - - { - } - init { } @@ -15,9 +9,6 @@ class A { init { } - { - } - /* abcde */init { } diff --git a/idea/testData/formatter/AnonymousInitializersLineBreak.after.kt b/idea/testData/formatter/AnonymousInitializersLineBreak.after.kt index 2096a3b583a..9d7d24e9841 100644 --- a/idea/testData/formatter/AnonymousInitializersLineBreak.after.kt +++ b/idea/testData/formatter/AnonymousInitializersLineBreak.after.kt @@ -1,12 +1,6 @@ annotation class Ann class A { - { - } - - { - } - init { } @@ -19,9 +13,6 @@ class A { } - { - } - /* abcde */init { diff --git a/idea/testData/formatter/AnonymousInitializersLineBreak.kt b/idea/testData/formatter/AnonymousInitializersLineBreak.kt index cb26df35dc7..f658a93aca5 100644 --- a/idea/testData/formatter/AnonymousInitializersLineBreak.kt +++ b/idea/testData/formatter/AnonymousInitializersLineBreak.kt @@ -1,15 +1,11 @@ annotation class Ann class A { - {}{} - init{} init {} init {} - {} - /* abcde */init { } diff --git a/idea/testData/hierarchy/calls/callees/kotlinClass/main0.kt b/idea/testData/hierarchy/calls/callees/kotlinClass/main0.kt index bd229783c3f..29b5abe42c9 100644 --- a/idea/testData/hierarchy/calls/callees/kotlinClass/main0.kt +++ b/idea/testData/hierarchy/calls/callees/kotlinClass/main0.kt @@ -12,7 +12,7 @@ open class KClientBase { } class KClient(): KClientBase() { - { + init { fun localFun(s: String): String = packageFun(s) diff --git a/idea/testData/hierarchy/calls/callees/kotlinObject/main0.kt b/idea/testData/hierarchy/calls/callees/kotlinObject/main0.kt index 0219c2fa943..11a9eb50565 100644 --- a/idea/testData/hierarchy/calls/callees/kotlinObject/main0.kt +++ b/idea/testData/hierarchy/calls/callees/kotlinObject/main0.kt @@ -12,7 +12,7 @@ open class KClientBase { } object KClient: KClientBase() { - { + init { fun localFun(s: String): String = packageFun(s) diff --git a/idea/testData/hierarchy/calls/callers/kotlinClass/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinClass/main0.kt index 6515d853845..a1d1fb3f5ec 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinClass/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinClass/main0.kt @@ -8,7 +8,7 @@ fun packageFun(s: String): String = s + KA().name val packageVal = KA().name class KClient { - { + init { KA() } diff --git a/idea/testData/hierarchy/calls/callers/kotlinFunction/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinFunction/main0.kt index 643e4c69b1d..8e5ee6cc4d1 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinFunction/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinFunction/main0.kt @@ -12,7 +12,7 @@ fun packageFun(s: String): String = KBase().foo("") + KA().foo(s) val packageVal = KBase().foo("") + KA().foo("") class KClient { - { + init { KA().foo("") KBase().foo("") } diff --git a/idea/testData/hierarchy/calls/callers/kotlinNestedClass/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinNestedClass/main0.kt index 5335b4e81bb..4189c58f036 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinNestedClass/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinNestedClass/main0.kt @@ -10,7 +10,7 @@ fun packageFun(s: String): String = s + T.KA().name val packageVal = T.KA().name class KClient { - { + init { T.KA() } diff --git a/idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/main0.kt index 8ac8cc3955f..62392eef179 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinNestedInnerClass/main0.kt @@ -10,7 +10,7 @@ fun packageFun(s: String): String = s + T().KA().name val packageVal = T().KA().name class KClient { - { + init { T().KA() } diff --git a/idea/testData/hierarchy/calls/callers/kotlinPackageFunction/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinPackageFunction/main0.kt index a8bc9517a9e..6ca1651f24a 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinPackageFunction/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinPackageFunction/main0.kt @@ -3,7 +3,7 @@ fun packageFun(s: String): String = s val packageVal = packageFun("") class KClient { - { + init { packageFun("") } diff --git a/idea/testData/hierarchy/calls/callers/kotlinPackageProperty/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinPackageProperty/main0.kt index f6c82208dfe..1eafa029f1d 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinPackageProperty/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinPackageProperty/main0.kt @@ -3,7 +3,7 @@ var packageVal = "" fun packageFun(s: String): String = packageVal + s class KClient { - { + init { packageVal = "" } @@ -24,7 +24,7 @@ class KClient { object KClientObj { val a = packageVal - { + init { packageVal = "" } } \ No newline at end of file diff --git a/idea/testData/hierarchy/calls/callers/kotlinProperty/main0.kt b/idea/testData/hierarchy/calls/callers/kotlinProperty/main0.kt index b017d3c165e..a053bee13aa 100644 --- a/idea/testData/hierarchy/calls/callers/kotlinProperty/main0.kt +++ b/idea/testData/hierarchy/calls/callers/kotlinProperty/main0.kt @@ -12,7 +12,7 @@ fun packageFun(s: String): String = KBase().name + KA().name val packageVal = KBase().name + KA().name class KClient { - { + init { KBase().name = "" KA().name = "" } @@ -37,7 +37,7 @@ class KClient { object KClientObj { val a = KBase().name + KA().name - { + init { KBase().name = "" KA().name = "" } diff --git a/idea/testData/hierarchy/class/sub/ClassFromClass/main.kt b/idea/testData/hierarchy/class/sub/ClassFromClass/main.kt index f72d6a9be7a..3392ab64503 100644 --- a/idea/testData/hierarchy/class/sub/ClassFromClass/main.kt +++ b/idea/testData/hierarchy/class/sub/ClassFromClass/main.kt @@ -5,7 +5,7 @@ class B: A() {} class MyClass(a: A = run { class X: A(); object: A() {} }) { inner class G: A() {} - { + init { class C: A() } diff --git a/idea/testData/hierarchy/class/sub/ClassFromTrait/main.kt b/idea/testData/hierarchy/class/sub/ClassFromTrait/main.kt index d6bb44e0702..f2e5d9e2c93 100644 --- a/idea/testData/hierarchy/class/sub/ClassFromTrait/main.kt +++ b/idea/testData/hierarchy/class/sub/ClassFromTrait/main.kt @@ -5,7 +5,7 @@ class B: A class MyClass(a: A = run { class X: A; object: A {} }) { inner class G: A {} - { + init { class C: A } diff --git a/idea/testData/hierarchy/class/sub/ObjectFromClass/main.kt b/idea/testData/hierarchy/class/sub/ObjectFromClass/main.kt index bc578c31956..dac9c2e0b7b 100644 --- a/idea/testData/hierarchy/class/sub/ObjectFromClass/main.kt +++ b/idea/testData/hierarchy/class/sub/ObjectFromClass/main.kt @@ -3,7 +3,7 @@ open class A object B: A() class MyClass(a: A = run { object: A() {} }) { - { + init { object C: A() } diff --git a/idea/testData/hierarchy/class/sub/ObjectFromTrait/main.kt b/idea/testData/hierarchy/class/sub/ObjectFromTrait/main.kt index 648a519f9a7..bb701a7764c 100644 --- a/idea/testData/hierarchy/class/sub/ObjectFromTrait/main.kt +++ b/idea/testData/hierarchy/class/sub/ObjectFromTrait/main.kt @@ -3,7 +3,7 @@ trait A object B: A class MyClass(a: A = run { object: A {} }) { - { + init { object C: A } diff --git a/idea/testData/hierarchy/class/sub/TraitFromClass/main.kt b/idea/testData/hierarchy/class/sub/TraitFromClass/main.kt index 02e6d785b3d..d65150647e8 100644 --- a/idea/testData/hierarchy/class/sub/TraitFromClass/main.kt +++ b/idea/testData/hierarchy/class/sub/TraitFromClass/main.kt @@ -5,7 +5,7 @@ trait B: A() class MyClass(a: A = run { trait X: A(); object: A() {} }) { inner trait G: A() {} - { + init { trait C: A() } diff --git a/idea/testData/hierarchy/class/sub/TraitFromTrait/main.kt b/idea/testData/hierarchy/class/sub/TraitFromTrait/main.kt index 0d892745ad7..e64271cf66b 100644 --- a/idea/testData/hierarchy/class/sub/TraitFromTrait/main.kt +++ b/idea/testData/hierarchy/class/sub/TraitFromTrait/main.kt @@ -5,7 +5,7 @@ trait B: A class MyClass(a: A = run { trait X: A; object: A {} }) { inner trait G: A {} - { + init { trait C: A } diff --git a/idea/testData/inspections/unusedSymbol/class/usedOnlyInside.kt b/idea/testData/inspections/unusedSymbol/class/usedOnlyInside.kt index c40f0cfe089..0c37db9768e 100644 --- a/idea/testData/inspections/unusedSymbol/class/usedOnlyInside.kt +++ b/idea/testData/inspections/unusedSymbol/class/usedOnlyInside.kt @@ -1,5 +1,5 @@ class A { - { + init { val x: A? = null } } \ No newline at end of file diff --git a/idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt b/idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt index 2564a088f0c..6225d82b41e 100644 --- a/idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt +++ b/idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt @@ -1,7 +1,7 @@ // PARAM_TYPES: kotlin.Int // PARAM_DESCRIPTOR: value-parameter val b: kotlin.Int defined in A. class A(val a: Int, b: Int) { - { + init { println(a + b - 1) } } \ No newline at end of file diff --git a/idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt.after b/idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt.after index 2fd4fe55ba9..9450185c162 100644 --- a/idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt.after +++ b/idea/testData/refactoring/extractFunction/initializers/classes/classInitializer.kt.after @@ -1,7 +1,7 @@ // PARAM_TYPES: kotlin.Int // PARAM_DESCRIPTOR: value-parameter val b: kotlin.Int defined in A. class A(val a: Int, b: Int) { - { + init { println(i(b) - 1) } diff --git a/idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt b/idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt index 129e17ea534..6f5b4f2f0f4 100644 --- a/idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt +++ b/idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt @@ -1,7 +1,7 @@ // PARAM_TYPES: kotlin.Int // PARAM_DESCRIPTOR: value-parameter val b: kotlin.Int defined in A. class A(val a: Int, b: Int) { - { + init { println({ a + b - 1 }.invoke()) } } \ No newline at end of file diff --git a/idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt.after b/idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt.after index a363d71d029..c1226ae4b95 100644 --- a/idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt.after +++ b/idea/testData/refactoring/extractFunction/initializers/classes/classInitializerWithLambda.kt.after @@ -1,7 +1,7 @@ // PARAM_TYPES: kotlin.Int // PARAM_DESCRIPTOR: value-parameter val b: kotlin.Int defined in A. class A(val a: Int, b: Int) { - { + init { println({ i(b) - 1 }.invoke()) } diff --git a/idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt b/idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt index 6bafa0602ed..d2adb08a411 100644 --- a/idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt +++ b/idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt @@ -3,7 +3,7 @@ class A { val i: Int - { + init { i = 1 } diff --git a/idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt.after b/idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt.after index 56690b67f77..20424313349 100644 --- a/idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt.after +++ b/idea/testData/refactoring/introduceProperty/extractToClassWithNameClashAndAnonymousInitializer.kt.after @@ -3,7 +3,7 @@ class A { val i: Int - { + init { i = 1 } diff --git a/idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt b/idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt index 68e12813d35..810249b14c5 100644 --- a/idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt +++ b/idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt @@ -1,5 +1,5 @@ open class A() { - { + init { do 1 while (true) } } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt.after b/idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt.after index 8bd97cf4fb8..3e69f7509ce 100644 --- a/idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt.after +++ b/idea/testData/refactoring/introduceVariable/DoWhileAddBlock.kt.after @@ -1,5 +1,5 @@ open class A() { - { + init { do { val i = 1 } while (true) diff --git a/idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt b/idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt index fa320c5399d..dcf1509c685 100644 --- a/idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt +++ b/idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt @@ -1,5 +1,5 @@ open class A() { - { + init { do println(1) while (true) } } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt.after b/idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt.after index 583da6902a8..548cf0d9f34 100644 --- a/idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt.after +++ b/idea/testData/refactoring/introduceVariable/DoWhileAddBlockInner.kt.after @@ -1,5 +1,5 @@ open class A() { - { + init { do { val i = 1 println(i) diff --git a/idea/testData/refactoring/introduceVariable/WhileAddBlock.kt b/idea/testData/refactoring/introduceVariable/WhileAddBlock.kt index 2ea3ea2f0ce..1f92130869e 100644 --- a/idea/testData/refactoring/introduceVariable/WhileAddBlock.kt +++ b/idea/testData/refactoring/introduceVariable/WhileAddBlock.kt @@ -1,5 +1,5 @@ open class A() { - { + init { while (true) 1 } } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceVariable/WhileAddBlock.kt.after b/idea/testData/refactoring/introduceVariable/WhileAddBlock.kt.after index 774dc3da8bc..f104e2f91a3 100644 --- a/idea/testData/refactoring/introduceVariable/WhileAddBlock.kt.after +++ b/idea/testData/refactoring/introduceVariable/WhileAddBlock.kt.after @@ -1,5 +1,5 @@ open class A() { - { + init { while (true) { val i = 1 } diff --git a/idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt b/idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt index 8eb53bed8b3..acdf2a25295 100644 --- a/idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt +++ b/idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt @@ -1,5 +1,5 @@ open class A() { - { + init { while (true) println(1) } } \ No newline at end of file diff --git a/idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt.after b/idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt.after index be5902f5420..f1590022a99 100644 --- a/idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt.after +++ b/idea/testData/refactoring/introduceVariable/WhileAddBlockInner.kt.after @@ -1,5 +1,5 @@ open class A() { - { + init { while (true) { val i = 1 println(i) diff --git a/idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassInitializer.kt b/idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassInitializer.kt index 04e9f3e8556..69362858689 100644 --- a/idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassInitializer.kt +++ b/idea/testData/resolve/additionalLazyResolve/anonymousObjectInClassInitializer.kt @@ -3,7 +3,7 @@ package test open class A class MyClass() { - { + init { val a = object: A() { } diff --git a/idea/testData/resolve/additionalLazyResolve/localClassInClassInitializer.kt b/idea/testData/resolve/additionalLazyResolve/localClassInClassInitializer.kt index ac394ad60d1..2bd796ae114 100644 --- a/idea/testData/resolve/additionalLazyResolve/localClassInClassInitializer.kt +++ b/idea/testData/resolve/additionalLazyResolve/localClassInClassInitializer.kt @@ -3,7 +3,7 @@ package test open class A class MyClass() { - { + init { class B: A() { } diff --git a/idea/testData/resolve/additionalLazyResolve/localObjectInClassInitializer.kt b/idea/testData/resolve/additionalLazyResolve/localObjectInClassInitializer.kt index ecb74c0b0e8..8d09e1731c4 100644 --- a/idea/testData/resolve/additionalLazyResolve/localObjectInClassInitializer.kt +++ b/idea/testData/resolve/additionalLazyResolve/localObjectInClassInitializer.kt @@ -3,7 +3,7 @@ package test open class A class MyClass() { - { + init { object O: A() { } diff --git a/idea/testData/structureView/fileStructure/Render.kt b/idea/testData/structureView/fileStructure/Render.kt index bd915e8ec8f..1a12ee9d3ed 100644 --- a/idea/testData/structureView/fileStructure/Render.kt +++ b/idea/testData/structureView/fileStructure/Render.kt @@ -32,7 +32,7 @@ class A6 { class A7 { val a: Int - { + init { a = 1 } } diff --git a/idea/testData/stubs/NotStorePropertiesFrom.kt b/idea/testData/stubs/NotStorePropertiesFrom.kt index 16f855b3625..e0efe173b78 100644 --- a/idea/testData/stubs/NotStorePropertiesFrom.kt +++ b/idea/testData/stubs/NotStorePropertiesFrom.kt @@ -1,6 +1,6 @@ class Test() { val test = 12; - { + init { for (i in 0..12) { } } diff --git a/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt b/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt index 44f19b15c57..6f031f4193d 100644 --- a/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt +++ b/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt @@ -4,7 +4,7 @@ fun foo() { fun a(x: Int): Int = b(x) + 1 fun b(y: Int): Int = a(y) - 1 - { + init { println(1) } @@ -16,7 +16,7 @@ fun foo() { val p = 1 val q = p + 1 - { + init { println(2) } @@ -27,7 +27,7 @@ fun foo() { } class B { - { + init { println(1) } @@ -44,7 +44,7 @@ fun foo() { val g = f() - 1 } - { + init { println(2) } @@ -61,7 +61,7 @@ fun foo() { fun aa(x: Int): Int = bb(x) + 1 fun bb(y: Int): Int = aa(y) - 1 - { + init { println(1) } @@ -73,7 +73,7 @@ fun foo() { val p = 1 val q = p + 1 - { + init { println(2) } @@ -87,7 +87,7 @@ fun foo() { fun a(x: Int): Int = b(x) + 1 fun b(y: Int): Int = a(y) - 1 - { + init { println(1) } @@ -99,7 +99,7 @@ fun foo() { val q = p + 1 val p = 1 - { + init { println(2) } @@ -113,7 +113,7 @@ fun foo() { fun a(x: Int): Int = b(x) + 1 fun b(y: Int): Int = a(y) - 1 - { + init { println(1) } @@ -125,7 +125,7 @@ fun foo() { val p = 1 val q = p + 1 - { + init { println(2) } diff --git a/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt.match b/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt.match index 95c074de9cf..abfa701c98f 100644 --- a/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt.match +++ b/idea/testData/unifier/equivalence/declarations/classesAndObjects/members.kt.match @@ -2,7 +2,7 @@ class A { fun a(x: Int): Int = b(x) + 1 fun b(y: Int): Int = a(y) - 1 - { + init { println(1) } @@ -14,7 +14,7 @@ class A { val p = 1 val q = p + 1 - { + init { println(2) } @@ -25,7 +25,7 @@ class A { } class B { - { + init { println(1) } @@ -42,7 +42,7 @@ class B { val g = f() - 1 } - { + init { println(2) } diff --git a/idea/testData/unifier/equivalence/expressions/conventions/assignments/indexedPlusAssignRuntime.kt b/idea/testData/unifier/equivalence/expressions/conventions/assignments/indexedPlusAssignRuntime.kt index 8cfd8b40c80..a5f44421bb8 100644 --- a/idea/testData/unifier/equivalence/expressions/conventions/assignments/indexedPlusAssignRuntime.kt +++ b/idea/testData/unifier/equivalence/expressions/conventions/assignments/indexedPlusAssignRuntime.kt @@ -6,7 +6,7 @@ class A(var n: Int) { } class Foo { - { + init { var a = Array(2) { A(it) } a[1] += 2 a[1] = a[1] + 2 diff --git a/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssign.kt b/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssign.kt index 0a10be4d7e5..9068a26e9bf 100644 --- a/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssign.kt +++ b/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssign.kt @@ -4,7 +4,7 @@ class A(val n: Int) { } class Foo { - { + init { var a = A(0) a += 2 a = a + 2 diff --git a/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssignWithSet.kt b/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssignWithSet.kt index 165650e6c92..abf64099dc1 100644 --- a/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssignWithSet.kt +++ b/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAndAssignWithSet.kt @@ -4,7 +4,7 @@ class A(val n: Int) { } class Foo { - { + init { var a = Array(2) { A(it) } a[1] += 2 a[1] = a[1] + 2 diff --git a/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAssign.kt b/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAssign.kt index 86421747797..48eeca76a42 100644 --- a/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAssign.kt +++ b/idea/testData/unifier/equivalence/expressions/conventions/assignments/plusAssign.kt @@ -6,7 +6,7 @@ class A(var n: Int) { } class Foo { - { + init { var a = A(0) a += 2 a = a + 2 diff --git a/idea/testData/unifier/equivalence/expressions/conventions/assignments/setRuntime.kt b/idea/testData/unifier/equivalence/expressions/conventions/assignments/setRuntime.kt index 16b56b030b9..2620f45c8e1 100644 --- a/idea/testData/unifier/equivalence/expressions/conventions/assignments/setRuntime.kt +++ b/idea/testData/unifier/equivalence/expressions/conventions/assignments/setRuntime.kt @@ -2,7 +2,7 @@ val array = Array(2) { it } class Foo { - { + init { array[1] = 10 array.set(1, 10) array2.set(1, 10) diff --git a/idea/tests/org/jetbrains/kotlin/idea/stubs/DebugTextByStubTest.kt b/idea/tests/org/jetbrains/kotlin/idea/stubs/DebugTextByStubTest.kt index 42c63555c9c..241e0794be1 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/stubs/DebugTextByStubTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/stubs/DebugTextByStubTest.kt @@ -192,7 +192,7 @@ public class DebugTextByStubTest : LightCodeInsightFixtureTestCase() { } fun testClassInitializer() { - val tree = createStubTree("class A {\n {} }") + val tree = createStubTree("class A {\n init {} }") val initializer = tree.findChildStubByType(JetStubElementTypes.CLASS)!!.findChildStubByType(JetStubElementTypes.CLASS_BODY)!! .findChildStubByType(JetStubElementTypes.ANONYMOUS_INITIALIZER) assertEquals("initializer in STUB: class A", JetClassInitializer(initializer as KotlinPlaceHolderStub).getDebugText())