FIR CFA: put primary constructor before other class members
This commit is contained in:
Vendored
-36
@@ -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() {}
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
fun testObject() {
|
||||
|
||||
Reference in New Issue
Block a user