Files
kotlin-fork/compiler/testData/codegen/bytecodeText/intrinsicsTrim/trimIndentNegative.kt
T
Jake Wharton 6ee987fa2e Add intrinsics for compile-time computing trimMargin/trimIndent
These only apply when the receiver can be resolved to a constant and the margin prefix, if specified, is also a constant.
2019-03-20 17:25:29 +01:00

21 lines
357 B
Kotlin
Vendored

fun notConstant(arg: String): String {
return arg.trimIndent()
}
fun interpolated(arg: Int):String {
return """
Hello,
$arg
""".trimIndent()
}
fun notInvoked():String {
return """
Hello,
World
"""
}
// 1 LDC "\\n Hello,\\n World\\n "
// 2 INVOKESTATIC kotlin/text/StringsKt.trimIndent