Skip to content
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

Clarify error message when an accessor is invoked. #27897

Closed
wants to merge 1 commit into from

Conversation

krk
Copy link
Contributor

@krk krk commented Oct 14, 2018

Fixes #24554

@krk krk force-pushed the invoked-accessor-message branch from 37c7a96 to 7366bc6 Compare October 14, 2018 19:02
@krk krk force-pushed the invoked-accessor-message branch from 3694945 to 1560a8c Compare December 1, 2018 20:41
@krk krk force-pushed the invoked-accessor-message branch from 1560a8c to 76f25fe Compare January 23, 2019 22:57
@RyanCavanaugh RyanCavanaugh added this to the Community milestone Jan 25, 2019
@krk krk force-pushed the invoked-accessor-message branch from 76f25fe to 34f6c51 Compare February 16, 2019 08:06
Copy link
Member

@RyanCavanaugh RyanCavanaugh left a comment

Choose a reason for hiding this comment

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

We like the idea of a better error experience here, but would need a simpler implementation to proceed (maybe a few lines of code). Certainly modifying getImmediateAliasedSymbol is too much risk for the sake of an error message improvement. A less comprehensive check like "Is the valueDeclaration of the property access expression a getter?" (which wouldn't handle 100.0% of cases, but would be much simpler) would be our preferred approach here. Thanks!

@sandersn
Copy link
Member

sandersn commented Feb 3, 2020

I'm cleaning up our PR backlog, so I'm going to close this one since it's been stale for a while.

@krk feel free to open a new PR addressing #24554. I'd recommend changing the check... functions, maybe checkPropertyAccessExpression and checkElementAccessExpression.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can we give better error messages on invoked accessors?
4 participants