KT-16554 Local function with default arguments have no IR elements for them

This commit is contained in:
Dmitry Petrov
2017-03-01 10:03:36 +03:00
parent ab3681e164
commit c226707a80
3 changed files with 25 additions and 11 deletions
@@ -1 +1,3 @@
fun test1(x: Int, y: Int = 0, z: String = "abc") {}
fun test1(x: Int, y: Int = 0, z: String = "abc") {
fun local(xx: Int = x, yy: Int = y, zz: String = z) {}
}
@@ -5,3 +5,11 @@ FILE /defaultArguments.kt
z: EXPRESSION_BODY
CONST String type=kotlin.String value='abc'
BLOCK_BODY
FUN local final fun local(xx: kotlin.Int = ..., yy: kotlin.Int = ..., zz: kotlin.String = ...): kotlin.Unit
xx: EXPRESSION_BODY
GET_VAR 'value-parameter x: Int' type=kotlin.Int origin=null
yy: EXPRESSION_BODY
GET_VAR 'value-parameter y: Int = ...' type=kotlin.Int origin=null
zz: EXPRESSION_BODY
GET_VAR 'value-parameter z: String = ...' type=kotlin.String origin=null
BLOCK_BODY