Kotlin: Escape TRAP strings

This commit is contained in:
Ian Lynagh
2021-08-16 10:45:46 +01:00
parent f85cf27df8
commit bbb9d013e0
4 changed files with 13 additions and 9 deletions

View File

@@ -34,9 +34,10 @@
| exprs.kt:24:14:24:18 | false |
| exprs.kt:28:13:28:15 | x |
| exprs.kt:29:16:29:25 | string lit |
| exprs.kt:33:12:33:14 | 123 |
| exprs.kt:33:12:33:20 | ... + ... |
| exprs.kt:33:18:33:20 | 456 |
| exprs.kt:30:25:30:37 | string " lit |
| exprs.kt:34:12:34:14 | 123 |
| exprs.kt:34:12:34:20 | ... + ... |
| exprs.kt:34:18:34:20 | 456 |
| file://:0:0:0:0 | b1 |
| file://:0:0:0:0 | b2 |
| file://:0:0:0:0 | b3 |
@@ -67,3 +68,4 @@
| file://:0:0:0:0 | i20 |
| file://:0:0:0:0 | i21 |
| file://:0:0:0:0 | str |
| file://:0:0:0:0 | strWithQuote |

View File

@@ -27,6 +27,7 @@ fun topLevelMethod(x: Int, y: Int): Int {
val b5 = !b1
val c = 'x'
val str = "string lit"
val strWithQuote = "string \" lit"
val b6 = i1 is Int
val b7 = i1 !is Int
val b8 = b7 as Boolean