Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

handle ins/del in completion-record typechecks #610

Merged
merged 3 commits into from
Sep 16, 2024
Merged

Conversation

bakkot
Copy link
Contributor

@bakkot bakkot commented Sep 12, 2024

Fixes #608.

The typechecker is already using the expr-parser output, which strips ins/del, but the result of that parse can have multiple adjacent name: 'text' items in sequence, which the typechecker didn't account for here. Specifically, with the input <ins>?</ins> Foo() we end up with [{ name: 'text', content: '?' }, { name: 'text', content: ' ' }, foo]. Adjust the logic to handle this case.

@michaelficarra
Copy link
Member

Let's add a test for using both ins and del to change the sigil, like in the original issue.

@bakkot
Copy link
Contributor Author

bakkot commented Sep 16, 2024

Done.

@bakkot bakkot merged commit 460ad15 into main Sep 16, 2024
2 checks passed
@bakkot bakkot deleted the typecheck-handle-ins-del branch September 16, 2024 17:07
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unexpected interaction between emu-format changing spacing around <ins> and completion records
2 participants