Files
kotlin/compiler/testData/codegen/bytecodeText/kt5016intOrNull.kt
Laszlo Hornyak 9dec0fb779 Correct the argument types of the StringBuilder.append
Modified AsmUtil to generate calls to more specific append methods
in the StringBuilder class in order to save computation time and make
less temporary objects.

Also adds unit-test to verify that the append(Object) method was
invoked 0 times while the append(String) 3 times

Signed-off-by: Laszlo Hornyak <laszlo.hornyak@gmail.com>
2014-06-02 16:34:44 +04:00

11 lines
407 B
Kotlin

// KT-5016 wrong StringBuilder append method invoked
class kt5016intOrNull {
fun f1(num : Int?) : String {
return "Hello to all the $num!"
}
}
// 1 INVOKEVIRTUAL java/lang/StringBuilder.append \(Ljava/lang/Object;\)Ljava/lang/StringBuilder
// 2 INVOKEVIRTUAL java/lang/StringBuilder.append \(Ljava/lang/String;\)Ljava/lang/StringBuilder
// 1 INVOKEVIRTUAL java/lang/StringBuilder.toString