Skip to content

No error on indirect calls #35878

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed

Conversation

ajafff
Copy link
Contributor

@ajafff ajafff commented Dec 27, 2019

Fixes: #35866 (in case you want to accept that issue)

@RyanCavanaugh for review

@sandersn sandersn added the For Backlog Bug PRs that fix a backlog bug label Feb 3, 2020
@sandersn sandersn added Experiment A fork with an experimental idea which might not make it into master For Uncommitted Bug PR for untriaged, rejected, closed or missing bug and removed For Backlog Bug PRs that fix a backlog bug Experiment A fork with an experimental idea which might not make it into master labels Mar 9, 2020
@sandersn sandersn self-assigned this Mar 27, 2020
@andrewbranch andrewbranch added For Backlog Bug PRs that fix a backlog bug and removed For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Oct 5, 2021
@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #35866. If you can get it accepted, this PR will have a better chance of being reviewed.

1 similar comment
@typescript-bot
Copy link
Collaborator

The TypeScript team hasn't accepted the linked issue #35866. If you can get it accepted, this PR will have a better chance of being reviewed.

@andrewbranch
Copy link
Member

Yes we have

return node.kind === SyntaxKind.Identifier && (node as Identifier).escapedText === "eval";
function isInIndirectCall(node: BinaryExpression) {
return node.parent.kind === SyntaxKind.ParenthesizedExpression && (isCallExpression(node.parent.parent) && node.parent.parent.expression === node.parent || node.parent.parent.kind === SyntaxKind.TaggedTemplateExpression) &&
(isAccessExpression(node.right) || isIdentifier(node.right) && node.right.escapedText === "eval");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we still have to check for eval? I think we want to silence the error for any indirect calls.

@sandersn
Copy link
Member

@ajafff Do you still want to work on this? Otherwise I'd like to close it to reduce the number of open PRs.

@sandersn
Copy link
Member

sandersn commented May 9, 2022

Closing since this has gotten stale.

@sandersn sandersn closed this May 9, 2022
@shicks shicks mentioned this pull request Dec 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

(0, object.property)() produces TS2695
4 participants