FIR CFA: put primary constructor before other class members

This commit is contained in:
pyos
2022-12-11 16:35:08 +01:00
committed by Dmitriy Novozhilov
parent c6e9afb788
commit 17ee8f3a7b
31 changed files with 1890 additions and 1871 deletions
@@ -1,36 +0,0 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun testObject() {
object : <!UNREACHABLE_CODE!>Foo(<!>todo()<!UNREACHABLE_CODE!>)<!> {
fun foo() = 1
}
}
fun testObjectExpression() {
val <!UNUSED_VARIABLE!>a<!> = object : <!UNREACHABLE_CODE!>Foo(<!>todo()<!UNREACHABLE_CODE!>)<!> {
fun foo() = 1
}
}
fun testObjectExpression1() {
fun bar(i: Int, x: Any) {}
bar(1, object : <!UNREACHABLE_CODE!>Foo(<!>todo()<!UNREACHABLE_CODE!>)<!> {
fun foo() = 1
})
}
fun testClassDeclaration() {
class C : <!UNREACHABLE_CODE!>Foo(<!>todo()<!UNREACHABLE_CODE!>)<!> {}
bar()
}
fun testFunctionDefaultArgument() {
fun foo(x: Int = todo()) { bar() }
}
open class Foo(i: Int) {}
fun todo(): Nothing = throw Exception()
fun bar() {}
@@ -1,3 +1,4 @@
// FIR_IDENTICAL
// !DIAGNOSTICS: -UNUSED_PARAMETER
fun testObject() {