Convert RemoveCurlyBracesFromTemplateIntention to inspection

Relates to #KT-31717
This commit is contained in:
Dmitry Gridin
2019-06-03 11:42:43 +07:00
parent 7f4d2891e8
commit 7bc2fcd657
31 changed files with 129 additions and 159 deletions
@@ -1 +0,0 @@
org.jetbrains.kotlin.idea.intentions.RemoveCurlyBracesFromTemplateIntention
@@ -1,5 +0,0 @@
// IS_APPLICABLE: false
fun foo() {
val x = "x"
val y = "$<caret>{x.length}"
}
@@ -1,9 +0,0 @@
// IS_APPLICABLE: false
fun foo() {
val x = X()
val y = "$<caret>{x.bar()}"
}
public class X() {
fun bar() : String = "bar"
}
@@ -1,6 +0,0 @@
// IS_APPLICABLE: false
fun foo() {
val x = 3
val z = 4
val y = "$<caret>{x + z}"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: false
fun foo() {
val x = 3
val y = "$<caret>{x}y"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: false
fun foo() {
val x = 3
val y = "$<caret>{x}_y"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: false
fun foo() {
val x = 3
val y = "$<caret>{x}コトリン"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "$<caret>{x}"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "$x"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "$<caret>{x}.moretext"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "$<caret>x.moretext"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "$<caret>{x}\n"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "$x\n"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "$<caret>{x}() this is okay, x will not be thought of as a function call"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "$x() this is okay, x will not be thought of as a function call"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "text$<caret>{x} moretext"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = "text$x moretext"
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = """text$<caret>{x} moretext"""
}
@@ -1,5 +0,0 @@
// IS_APPLICABLE: true
fun foo() {
val x = 4
val y = """text$x moretext"""
}
@@ -1,4 +0,0 @@
// IS_APPLICABLE: true
fun foo(`object`: Any) {
val bar = "$<caret>{`object`}"
}
@@ -1,4 +0,0 @@
// IS_APPLICABLE: true
fun foo(`object`: Any) {
val bar = "$`object`"
}