Skip to content

Conversation

@vkaverin
Copy link
Contributor

@vkaverin vkaverin commented May 12, 2022

This PR fixes case when class' field has type of array with nullable elements, like (?string)[].

Currently, when the parser's coming to the ? symbol it wraps everything at the right side into parentheses, so when it comes to ?string)[] (note that first ( is already dropped) it turns it into null|(string)[]) which is equivalent to ?string[], but not initial (?string)[].

Nullability via ? is equivalent to null|, so there's no necessity to wrap type into extra parentheses.

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.

1 participant