Files
kotlin-fork/idea/testData/checker/StringTemplates.jet
T
Andrey Breslav ee61fa7e10 JET-142 Support string templates:
Make '$' in short entries a separate token
2011-07-12 13:37:18 +04:00

21 lines
469 B
Plaintext

fun demo() {
val abc = 1
val a = ""
val asd = 1
val bar = 5
fun map(f : fun () : Any?) : Int = 1
fun buzz(f : fun () : Any?) : Int = 1
val sdf = 1
val foo = 3;
"$abc"
"$"
"$.$.asdf$\t"
"asd\$"
"asd$a<error>\x</error>"
"asd$a$asd$ $<error>xxx</error>"
"fosdfasdo${1 + bar + 100}}sdsdfgdsfsdf"
"foo${bar + map {foo}}sdfsdf"
"foo${bar + map { "foo" }}sdfsdf"
"foo${bar + map {
"foo$sdf${ buzz{}}" }}sdfsdf"
}