[FIR2IR] Generate IR declarations in classes in strict order

Order is following:
- declared declarations in declaration (in source) order
- generated declarations in sorted order
This commit is contained in:
Dmitriy Novozhilov
2023-03-13 11:57:27 +02:00
committed by Space Team
parent c961c15729
commit 839026b6fe
15 changed files with 467 additions and 22 deletions
@@ -0,0 +1,53 @@
package test
class A {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
constructor(x: Int) {
this/*A*/()
}
fun b() {
}
fun a() {
}
val b: Int
field = 1
get
val a: Int
field = 2
get
constructor(x: String) {
this/*A*/()
}
val Int.b: String
get(): String {
return "b"
}
fun String.b() {
}
val Int.a: String
get(): String {
return "a"
}
fun String.a() {
}
constructor(x: Double) {
this/*A*/()
}
}