slint-sc: don't suggest qualified names that are outside the subset - #12954
Merged
Conversation
tronical
force-pushed
the
simon/slint-sc-image
branch
from
August 19, 2026 15:16
c785b4c to
a224e65
Compare
The "Did you mean 'Colors.red'?" hint added for unresolved identifiers suggested named colors and builtin enum values in Slint SC mode, where the qualified forms don't resolve either. This also broke the slint-sc syntax tests, which match the full diagnostic message. Build the suggestions from the same lookup objects that gate the subset, instead of checking named_colors() and the type register directly: enum_or_color_suggestions now takes the LookupCtx and asks BuiltinNamespaceLookup and the enum lookup, so a name is only suggested when its qualified form resolves. User-declared enums are in the subset, so their values are still suggested.
tronical
force-pushed
the
simon/slint-sc-image
branch
from
August 20, 2026 05:17
a224e65 to
db8e8d8
Compare
0x6e
approved these changes
Aug 20, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The "Did you mean 'Colors.red'?" hint added for unresolved identifiers suggested named colors and builtin enum values in Slint SC mode, where the qualified forms don't resolve either. This also broke the slint-sc syntax tests, which match the full diagnostic message.
Build the suggestions from the same lookup objects that gate the subset, instead of checking named_colors() and the type register directly: enum_or_color_suggestions now takes the LookupCtx and asks BuiltinNamespaceLookup and the enum lookup, so a name is only suggested when its qualified form resolves. User-declared enums are in the subset, so their values are still suggested.