2 Intentions for string templates:
the first removes curly braces from a simple name variable, ${x} -> $x
and the second does the opposite $x -> ${x}
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "<caret>hello"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "$<caret>x"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "${x}"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "something$<caret>x.somethingelse"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "something${x}.somethingelse"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "$<caret>x\n"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "${x}\n"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "$x$<caret>x$x"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = "$x${x}$x"
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = """$x$<caret>x$x"""
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
val x = 4
|
||||
val y = """$x${x}$x"""
|
||||
}
|
||||
Reference in New Issue
Block a user