Skip to content

Commit

Permalink
Fixes types on call expression info class (#877)
Browse files Browse the repository at this point in the history
  • Loading branch information
markwpearce authored Aug 30, 2023
1 parent 8926e60 commit 0e1106c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/bscPlugin/CallExpressionInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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);
Expand All @@ -116,7 +116,7 @@ export class CallExpressionInfo {
}
}

return callExpression as CallExpression;
return callExpression;
}

ascertainType(): CallExpressionType {
Expand Down

0 comments on commit 0e1106c

Please sign in to comment.