File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/kotlin/io/runescript/plugin/ide/inspections/fixes Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -24,13 +24,19 @@ class RsDeleteLocalVariableFix : LocalQuickFix {
24
24
}
25
25
26
26
private fun RsExpression.isSimpleToRemove (): Boolean {
27
+ if (this is RsStringLiteralExpression ) {
28
+ return stringLiteralContent.stringInterpolationExpressionList.all { it.isSimpleToRemove() }
29
+ }
27
30
return when (this ) {
28
31
is RsNullLiteralExpression ,
29
32
is RsIntegerLiteralExpression ,
30
33
is RsCoordLiteralExpression ,
31
34
is RsBooleanLiteralExpression ,
32
- is RsLongLiteralExpression -> true
33
-
35
+ is RsLongLiteralExpression ,
36
+ is RsLocalVariableExpression ,
37
+ is RsConstantExpression ,
38
+ is RsArrayAccessExpression -> true
39
+ is RsStringInterpolationExpression -> expression.isSimpleToRemove()
34
40
is RsParExpression -> expression.isSimpleToRemove()
35
41
is RsCalcExpression -> expression.isSimpleToRemove()
36
42
is RsBinaryExpression -> left.isSimpleToRemove() && right.isSimpleToRemove()
You can’t perform that action at this time.
0 commit comments