-
Notifications
You must be signed in to change notification settings - Fork 93
Draft grammar to permit nullable types as array element types. #1297
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
base: draft-v8
Are you sure you want to change the base?
Conversation
@@ -54,7 +54,8 @@ interface_type | |||
; | |||
|
|||
array_type | |||
: non_array_type rank_specifier+ | |||
| non_array_type rank_specifier+ | |||
| non_array_type ( nullable_type_annotation rank_specifier+ )+ |
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.
Does this allow int??[]
?
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.
No, because a nullable type isn't a non_array_type
.
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.
If I'm reading it right, non_array_type
includes value_type
which includes nullable_value_type
which I believe int?
would be.
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.
See TG2 email discussion for details.
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.
We want to wait for a meeting where @gafter is present to discuss this as well, but @jnm2 is keen to get his hands dirty with it when he finds time.
I made it happen! See #1386 for my proposed grammar changes. If we take my PR as the direction, @gafter's other changes in this PR will be valuable to move over.
Proposed replacement for #1287
@Nigel-Ecma Can you please help me set up the testing for this PR?