Skip to content

Call back into getTypeOfFuncClassEnumModule in getTypeOfVariableOrParameterOrProperty #20939

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

Merged

Conversation

weswigham
Copy link
Member

If the symbol's valueDeclaration is of an irregular kind.

Fixes #20826. The root of the issue was that the merged symbol for the bold property had flags for both Property and Method - inside getTypeOfSymbol, we take this to mean that the symbol should be looked at as a Property, but the method signature was the authoritative valueDeclaration, since it came first. This mismatch resulted in getTypeOfVariableOrParameterOrProperty not knowing how to look up the symbol's type correctly, resulting in it pulling the overall type of the symbol from the return type of the method signature (since that is at the declaration's .type member). This changes getTypeOfVariableOrParameterOrProperty in the case of value declarations that it really did not know what was correct to now check if the symbol had other valid flags, and look at the symbol as that instead.

…ameterOrProperty if valueDeclaration is irregular kind
@weswigham weswigham merged commit 29378b2 into microsoft:master Jan 3, 2018
@weswigham weswigham deleted the duplicate-mismatch-should-error branch January 3, 2018 01:19
@microsoft microsoft locked and limited conversation to collaborators Jul 3, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants