Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1abaecf

Browse files
committed
Kotlin: String templates are already supported
1 parent 4c8a87b commit 1abaecf

3 files changed

Lines changed: 13 additions & 1 deletion

File tree

java/ql/test/kotlin/library-tests/exprs/binop.expected

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
| exprs.kt:110:15:110:22 | ... >= ... | exprs.kt:110:15:110:16 | fx | exprs.kt:110:21:110:22 | fy |
7171
| exprs.kt:111:15:111:23 | ... == ... | exprs.kt:111:15:111:16 | fx | exprs.kt:111:22:111:23 | fy |
7272
| exprs.kt:112:15:112:23 | ... != ... | exprs.kt:112:15:112:16 | fx | exprs.kt:112:22:112:23 | fy |
73+
| exprs.kt:130:31:130:41 | ... + ... | exprs.kt:130:31:130:34 | str1 | exprs.kt:130:38:130:41 | str2 |
7374
| exprs.kt:131:16:131:26 | ... + ... | exprs.kt:131:16:131:19 | str1 | exprs.kt:131:23:131:26 | str2 |
7475
| exprs.kt:134:12:134:23 | ... > ... | exprs.kt:134:12:134:19 | variable | exprs.kt:134:23:134:23 | 0 |
7576
| exprs.kt:138:12:138:20 | ... + ... | exprs.kt:138:12:138:14 | 123 | exprs.kt:138:18:138:20 | 456 |

java/ql/test/kotlin/library-tests/exprs/exprs.expected

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,17 @@
426426
| exprs.kt:129:34:129:38 | bar | exprs.kt:4:1:139:1 | topLevelMethod | StringLiteral |
427427
| exprs.kt:129:40:129:43 | str2 | exprs.kt:4:1:139:1 | topLevelMethod | VarAccess |
428428
| exprs.kt:129:44:129:47 | baz | exprs.kt:4:1:139:1 | topLevelMethod | StringLiteral |
429+
| exprs.kt:130:5:130:66 | str5 | exprs.kt:4:1:139:1 | topLevelMethod | LocalVariableDeclExpr |
430+
| exprs.kt:130:24:130:66 | "..." | exprs.kt:4:1:139:1 | topLevelMethod | StringTemplateExpr |
431+
| exprs.kt:130:25:130:28 | foo | exprs.kt:4:1:139:1 | topLevelMethod | StringLiteral |
432+
| exprs.kt:130:31:130:34 | str1 | exprs.kt:4:1:139:1 | topLevelMethod | VarAccess |
433+
| exprs.kt:130:31:130:41 | ... + ... | exprs.kt:4:1:139:1 | topLevelMethod | AddExpr |
434+
| exprs.kt:130:38:130:41 | str2 | exprs.kt:4:1:139:1 | topLevelMethod | VarAccess |
435+
| exprs.kt:130:43:130:47 | bar | exprs.kt:4:1:139:1 | topLevelMethod | StringLiteral |
436+
| exprs.kt:130:50:130:53 | str2 | exprs.kt:4:1:139:1 | topLevelMethod | VarAccess |
437+
| exprs.kt:130:50:130:60 | plus(...) | exprs.kt:4:1:139:1 | topLevelMethod | MethodAccess |
438+
| exprs.kt:130:57:130:60 | str1 | exprs.kt:4:1:139:1 | topLevelMethod | VarAccess |
439+
| exprs.kt:130:62:130:65 | baz | exprs.kt:4:1:139:1 | topLevelMethod | StringLiteral |
429440
| exprs.kt:131:5:131:26 | str6 | exprs.kt:4:1:139:1 | topLevelMethod | LocalVariableDeclExpr |
430441
| exprs.kt:131:16:131:19 | str1 | exprs.kt:4:1:139:1 | topLevelMethod | VarAccess |
431442
| exprs.kt:131:16:131:26 | ... + ... | exprs.kt:4:1:139:1 | topLevelMethod | AddExpr |

java/ql/test/kotlin/library-tests/exprs/exprs.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ TODO
127127
val str2: String? = "string lit"
128128
val str3: String? = null
129129
val str4: String = "foo $str1 bar $str2 baz"
130-
// TODO val str5: String = "foo ${str1 + str2} bar ${str2 + str1} baz"
130+
val str5: String = "foo ${str1 + str2} bar ${str2 + str1} baz"
131131
val str6 = str1 + str2
132132

133133
var variable = 10

0 commit comments

Comments
 (0)