More tests for KT-451 Incorrect character literals cause assertion failures

This commit is contained in:
Andrey Breslav
2011-11-10 15:42:14 +03:00
parent c8e2e06d59
commit dda5759643
@@ -1,6 +1,23 @@
// http://youtrack.jetbrains.net/issue/KT-451
// KT-451 Incorrect character literals cause assertion failures
fun ff() {
val b = <!ERROR_COMPILE_TIME_VALUE!>''<!>
val c = <!ERROR_COMPILE_TIME_VALUE!>'23'<!>
}
fun test() {
'a'
'\n'
'\t'
'\b'
'\r'
'\"'
'\''
'\\'
'\$'
<!ERROR_COMPILE_TIME_VALUE!>'\x'<!>
<!ERROR_COMPILE_TIME_VALUE!>'\123'<!>
<!ERROR_COMPILE_TIME_VALUE!>'\ra'<!>
<!ERROR_COMPILE_TIME_VALUE!>'\000'<!>
}