-
Notifications
You must be signed in to change notification settings - Fork 400
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
Check completion proposal is compatible or not. #2733
Check completion proposal is compatible or not. #2733
Conversation
jdneo
commented
Jun 28, 2023
- Early return if the completion proposal is not compatible with the expected type.
- Early return if the completion proposal is not compatible with the expected type. Signed-off-by: Sheng Chen <sheche@microsoft.com>
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.
Previously, we had to use type hierarchy to find the inheritance path between the proposed type and the expected type for each constructor completion proposal. This was slow for a long proposal list. Now we can use the cached compatibility between the proposed type and the expected type to filter out the proposals that are not inherited earlier. This makes sense for performance improvement.
LGTM.
you probably have MyClass down the list. In my case, I selected once already so I believe VS Code might have bumped its priority to put it up the list. |
also try MyC, then trigger completion |
Signed-off-by: Sheng Chen <sheche@microsoft.com>
Checked the inner class case. It's working with this PR actually. I added a new test case to cover that. |
since it doesn't break the case Fred mentioned, I think we can merge this PR now. |