[FIR] KT-53479: Paraphrase INSTANCE_ACCESS_BEFORE_SUPER_CALL

This commit is contained in:
Nikolay Lunyak
2022-09-07 13:56:49 +03:00
committed by Space
parent 367761008b
commit dccb7faf2e
5 changed files with 8 additions and 8 deletions
@@ -4,7 +4,7 @@ warning: ATTENTION!
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:26: error: unresolved reference: getSomeInt
constructor(x: Int = getSomeInt(), other: A = this, header: String = keker) {}
^
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:51: error: cannot access '<this>' before superclass constructor has been called
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:51: error: cannot access '<this>' before the instance has been initialized
constructor(x: Int = getSomeInt(), other: A = this, header: String = keker) {}
^
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: unresolved reference: keker
@@ -13,13 +13,13 @@ compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:2:74: error: unresolv
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:7:20: error: 'this' is not defined in this context
class B(other: B = this)
^
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is kotlin/Function0<ERROR CLASS: Cannot access ''<this>'' before superclass constructor has been called> but kotlin/Int was expected
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:10:32: error: argument type mismatch: actual type is kotlin/Function0<ERROR CLASS: Cannot access ''<this>'' before the instance has been initialized> but kotlin/Int was expected
constructor(x: Int) : this({
^
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: argument type mismatch: actual type is ERROR CLASS: Cannot access ''<this>'' before superclass constructor has been called but ERROR CLASS: Unknown return lambda parameter type was expected
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: argument type mismatch: actual type is ERROR CLASS: Cannot access ''<this>'' before the instance has been initialized but ERROR CLASS: Unknown return lambda parameter type was expected
this
^
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '<this>' before superclass constructor has been called
compiler/testData/cli/jvm/instanceAccessBeforeSuperCall.kt:12:9: error: cannot access '<this>' before the instance has been initialized
this
^
COMPILATION_ERROR