Files
kotlin/compiler/testData/codegen/bytecodeText/kt5016.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
391 B
Kotlin
Vendored

// KT-5016 wrong StringBuilder append method invoked
class kt5016 {
fun f1(name : String) : String {
return "Hello $name!"
}
}
// 0 INVOKEVIRTUAL java/lang/StringBuilder.append \(Ljava/lang/Object;\)Ljava/lang/StringBuilder
// 3 INVOKEVIRTUAL java/lang/StringBuilder.append \(Ljava/lang/String;\)Ljava/lang/StringBuilder
// 1 INVOKEVIRTUAL java/lang/StringBuilder.toString