From 0e1106c2a06723c9f95cda525d1f77ea88b7e835 Mon Sep 17 00:00:00 2001 From: Mark Pearce Date: Wed, 30 Aug 2023 10:59:46 -0300 Subject: [PATCH] Fixes types on call expression info class (#877) --- src/bscPlugin/CallExpressionInfo.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bscPlugin/CallExpressionInfo.ts b/src/bscPlugin/CallExpressionInfo.ts index e200ae744..32bd6e00b 100644 --- a/src/bscPlugin/CallExpressionInfo.ts +++ b/src/bscPlugin/CallExpressionInfo.ts @@ -66,7 +66,7 @@ export class CallExpressionInfo { this.newExpression = callExpression.parent; } if (isCallfuncExpression(callExpression)) { - this.name = (callExpression as CallfuncExpression).methodName.text; + this.name = callExpression.methodName.text; } else if (isVariableExpression(callExpression.callee)) { this.name = callExpression.callee.name.text; } else if (isVariableExpression(callExpression)) { @@ -94,7 +94,7 @@ export class CallExpressionInfo { return util.rangeContains(boundingRange, this.position); } - ascertainCallExpression(): CallExpression { + ascertainCallExpression(): CallExpression | CallfuncExpression { let expression = this.expression; function isCallFuncOrCallExpression(expression: Expression) { return isCallfuncExpression(expression) || isCallExpression(expression); @@ -116,7 +116,7 @@ export class CallExpressionInfo { } } - return callExpression as CallExpression; + return callExpression; } ascertainType(): CallExpressionType {