Add "Too long character literal -> string" fix to ILLEGAL_ESCAPE error

So #KT-23788 Fixed
This commit is contained in:
Toshiaki Kameyama
2018-05-01 17:04:56 +03:00
committed by Mikhail Glukhikh
parent 6d39eb9239
commit 85cd1e938e
6 changed files with 32 additions and 1 deletions
@@ -0,0 +1,7 @@
// "Convert too long character literal to string" "false"
// ACTION: Introduce local variable
// ERROR: Illegal escape: ''\''
fun foo() {
'\'<caret>
}
@@ -0,0 +1,6 @@
// "Convert too long character literal to string" "true"
// ERROR: Illegal escape: '\ '
fun foo() {
'\ bar<caret>'
}
@@ -0,0 +1,6 @@
// "Convert too long character literal to string" "true"
// ERROR: Illegal escape: '\ '
fun foo() {
"\ bar"
}