Fix initialization order
* put inheritance code in the beginning * put top-level initializer after any declaration
This commit is contained in:
committed by
Roman Artemev
parent
cff066f702
commit
0c6256d003
@@ -0,0 +1,14 @@
|
||||
// EXPECTED_REACHABLE_NODES: 1117
|
||||
package foo
|
||||
|
||||
class C: B()
|
||||
open class B: A()
|
||||
open class A
|
||||
|
||||
fun box(): String {
|
||||
val c = C()
|
||||
|
||||
if (c !is A) return "FAIL"
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user