Files
kotlin/compiler/testData/codegen/bytecodeText/defaultArguments/kt11962.kt
Alexander Udalov b4051c4577 Do not generate unnecessary super-call checks for functions with defaults
Such check should only be generated for a function in an open class

 #KT-11962 Fixed
2016-12-27 16:22:12 +03:00

18 lines
270 B
Kotlin
Vendored

// KT-11962 Super call with default parameters check is generated for top-level function
fun foo(x: Int = 1) { }
class FinalClass {
fun bar(x: Int = 2) { }
}
object Object {
fun baz(x: Int = 3) { }
}
fun test() {
fun local(x: Int = 4) { }
}
// 0 ATHROW