Files
kotlin-fork/compiler/testData/diagnostics/tests/StringTemplates.jet
T
Andrey Breslav 41fd43b5e5 GreatSyntacticShift: Syntax for function types, function literals, when and tuples
Bug:
fun loop(var times : Int) {
   while(times > 0) {
        val u : (value : Int) -> Unit = { // This arrow is confusing the lookahead
            System.out?.println(it)
        }
        u(times--)
   }
}
2011-12-20 22:55:25 +04:00

22 lines
708 B
Plaintext

fun demo() {
val abc = 1
val a = ""
val asd = 1
val bar = 5
fun map(f : () -> Any?) : Int = 1
fun buzz(f : () -> Any?) : Int = 1
val sdf = 1
val foo = 3;
"$abc"
"$"
"$.$.asdf$\t"
"asd\$"
"asd$a<!ILLEGAL_ESCAPE_SEQUENCE!>\x<!>"
"asd$a$asd$ $<!UNRESOLVED_REFERENCE!>xxx<!>"
"fosdfasdo${1 + bar + 100}}sdsdfgdsfsdf"
"foo${bar + map {foo}}sdfsdf"
"foo${bar + map { "foo" }}sdfsdf"
"foo${bar + map {
"foo$sdf${ buzz{}}" }}sdfsdf"
"a<!ILLEGAL_ESCAPE_SEQUENCE!>\u<!> <!ILLEGAL_ESCAPE_SEQUENCE!>\u<!>0 <!ILLEGAL_ESCAPE_SEQUENCE!>\u<!>00 <!ILLEGAL_ESCAPE_SEQUENCE!>\u<!>000 \u0000 \u0AaA <!ILLEGAL_ESCAPE_SEQUENCE!>\u<!>0AAz.length( ) + \u0022b"
}