[FIR2IR] Get rid of all usages of IrSymbol.owner from DataClassMembersGenerator

This change uncovered the following problem in pipeline: we have a contract,
  that all bodies will be generated after all fake overrides will be preprocessed.
  But DataClassMembersGenerator generates bodies before f/o creation,
  which leads to the problem, if data class has forward reference to some
  class which was not processed before (because in this case generator
  of `hashCode` function will try to reference f/o, which is not created yet,
  which leads to `SymbolAlreadyBound` problem)

```
data class Some(val a: A) {
    generated fun hashCode(): Int {
        return a.hashCode() // (1) is not generated yet
    }
}

class A {
    fake-override fun hashCode(): Int // (1)
}
```

This problem will be fixed in the next commit

(related test is compiler/testData/codegen/box/ir/kt52677.kt)

^KT-60924
This commit is contained in:
Dmitriy Novozhilov
2023-08-18 15:30:49 +03:00
committed by Space Team
parent b38de13696
commit 76d3c0e804
6 changed files with 111 additions and 56 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
// ISSUE: KT-52677
// IGNORE_BACKEND_K2: ANY
// MODULE: lib
// FILE: lib.kt