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

Prevent chpl-language-server from providing type inserts for loops #25151

Merged
merged 5 commits into from
Jun 3, 2024

Conversation

jabraham17
Copy link
Member

@jabraham17 jabraham17 commented May 31, 2024

This fixes an issue where chpl-language-server would add insertable type inlays for loops, even though thats not valid syntax. If a user tried to insert the type inlay, they would then get a syntax error. This PR prevents users from making that mistake by removing the insertable inlay. The inlay still shows, it is just not insertable.

Prior to this PR, users woild be able to insert the type as shown below
Screenshot 2024-05-31 at 3 11 56 PM

Inserting this type creates the following error
Screenshot 2024-05-31 at 3 13 11 PM

This PR prevents this situation from occurring all together.

Tested locally with make test-cls

[Reviewed by @DanilaFe]

@jabraham17 jabraham17 requested a review from DanilaFe May 31, 2024 22:05
Signed-off-by: Jade Abraham <[email protected]>
@DanilaFe
Copy link
Contributor

A picture of the bug-to-be-fixed would help the PR OP.

tools/chpl-language-server/test/util/utils.py Outdated Show resolved Hide resolved
tools/chpl-language-server/test/util/utils.py Outdated Show resolved Hide resolved
Signed-off-by: Jade Abraham <[email protected]>
Signed-off-by: Jade Abraham <[email protected]>
@jabraham17 jabraham17 force-pushed the fix-type-inlay-bug branch from 487ff37 to 7b16fce Compare May 31, 2024 22:21
@jabraham17 jabraham17 merged commit d18b61f into chapel-lang:main Jun 3, 2024
8 checks passed
@jabraham17 jabraham17 deleted the fix-type-inlay-bug branch June 3, 2024 15:09
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.

2 participants