-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Avoid bogus circularity error on context sensitive constructor property assignments #44601
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
Avoid bogus circularity error on context sensitive constructor property assignments #44601
Conversation
e5594e6
to
39d4a59
Compare
src/compiler/checker.ts
Outdated
} | ||
return undefined; | ||
|
||
function tryGetPrivateIdentifierPropertyOfType(type: Type, id: PrivateIdentifier) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this nested (it doesn't capture e
) ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just because it wasn't used outside of this function. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'm convinced about the approach. Just needs a test in JS, since I think that evolving class properties work in JS, and may incorrectly get marked as ThisProperty assignments there.
@sandersn done, there's now a JS test, and the code's been shuffled a bit to cover the JS case as well. |
Fixes #44581