Add ThisExpr to hasSideEffects()

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent 1318cce216
commit 919d9c2386
  1. 2
      deob-ast/src/main/java/dev/openrs2/deob/ast/util/ExprUtils.kt

@ -116,7 +116,7 @@ fun Expression.countNots(): Int {
} }
fun Expression.hasSideEffects(): Boolean { fun Expression.hasSideEffects(): Boolean {
if (isLiteralExpr || isNameExpr || isFieldAccessExpr) { if (isLiteralExpr || isNameExpr || isFieldAccessExpr || isThisExpr) {
return false return false
} else if (isUnaryExpr) { } else if (isUnaryExpr) {
return asUnaryExpr().expression.hasSideEffects() return asUnaryExpr().expression.hasSideEffects()

Loading…
Cancel
Save