mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-08 15:53:19 +00:00
Extracted complex string concatenation bytecode test case into separate test data file.
This commit is contained in:
committed by
max-kammerer
parent
d4d5a6011c
commit
fc5eac26cd
10
compiler/testData/codegen/bytecodeText/stringOperations/multipleNestedConcat.kt
vendored
Normal file
10
compiler/testData/codegen/bytecodeText/stringOperations/multipleNestedConcat.kt
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
// Uses 3 StringBuilders:
|
||||
// - In return expression
|
||||
// - In argument to 1st call to foo()
|
||||
// - In argument to 2nd call to foo() inside string literal
|
||||
fun test(s1: String, s2: String, s3: String): String {
|
||||
fun foo(s: String) = s
|
||||
return "foo: " + foo(s1 + s2 + " ${foo("\${s3.length} = ${s3.length}")}")
|
||||
}
|
||||
|
||||
// 3 NEW java/lang/StringBuilder
|
||||
Reference in New Issue
Block a user