Skip to content

Typo in grammar for ~P#449

Merged
amartini51 merged 1 commit intomainfrom
jaredgrubb-types-grammar-typo
Mar 13, 2026
Merged

Typo in grammar for ~P#449
amartini51 merged 1 commit intomainfrom
jaredgrubb-types-grammar-typo

Conversation

@jaredgrubb
Copy link
Contributor

The grammar here would only allow ~P on the final element of a list but it's allowed on any of the elements (eg, struct S: ~Copyable, ~Escapable).

Another way to see the bug: notice how the grammar only allows a comma after a type-identifier's that may not have a ~.

The grammar here would only allow `~P` on the final element of a list but it's allowed on any of the elements (eg, `struct S: ~Copyable, ~Escapable`).
@jaredgrubb jaredgrubb requested a review from amartini51 as a code owner March 8, 2026 02:01
@amartini51 amartini51 changed the title Types.md: Fix grammar typo Typo in grammar for ~P Mar 13, 2026
Copy link
Member

@amartini51 amartini51 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, this looks like an oversight when updating the grammar. I agree with the summary in the PR — without this change, ~P is only allowed on the last element of the list, because that's the only time the left-hand production is used.

@amartini51 amartini51 merged commit 1196770 into main Mar 13, 2026
@amartini51 amartini51 deleted the jaredgrubb-types-grammar-typo branch March 13, 2026 00:40
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