enhancements in character constant parsing

* missing assertion converted to ErrorValue
* added test for 'a
* '\' must be error (KT-461)
This commit is contained in:
Stepan Koltsov
2011-11-10 16:16:31 +04:00
parent dda5759643
commit 44b631cdd0
2 changed files with 13 additions and 3 deletions
@@ -4,6 +4,9 @@
fun ff() {
val b = <!ERROR_COMPILE_TIME_VALUE!>''<!>
val c = <!ERROR_COMPILE_TIME_VALUE!>'23'<!>
val d = <!ERROR_COMPILE_TIME_VALUE!>'a<!>
val e = <!ERROR_COMPILE_TIME_VALUE!>'ab<!>
val f = <!ERROR_COMPILE_TIME_VALUE!>'\'<!>
}
fun test() {
@@ -20,4 +23,4 @@ fun test() {
<!ERROR_COMPILE_TIME_VALUE!>'\123'<!>
<!ERROR_COMPILE_TIME_VALUE!>'\ra'<!>
<!ERROR_COMPILE_TIME_VALUE!>'\000'<!>
}
}