Parse [ after nullable type as part of the type#55044
Parse [ after nullable type as part of the type#55044cston merged 2 commits intodotnet:release/dev16.11from
[ after nullable type as part of the type#55044Conversation
Before this change, In reply to: 885021921 Refers to: src/Compilers/CSharp/Portable/Parser/LanguageParser.cs:6861 in 4b559f9. [](commit_id = 4b559f9, deletion_comment = False) |
|
@dotnet/roslyn-compiler, please review this fix for parsing nullable array types in |
| [Fact] | ||
| public void NullableType_Switch_03() | ||
| { | ||
| string source = "x switch { string? [A] y => y }"; |
There was a problem hiding this comment.
Makes me glad that we decided to separate list-pattern from the more general recursive pattern ;-)
|
Approved by BU and Division triage in email. Can be merged to 16.11 |
Parse
? [as a nullable array type always inswitchandisexpression pattern types:x switch { string ? [] y => y }As a result, parentheses are required when the
[starts a lambda expression with attributes:x is string ? ([A] y => y) : zFixes #55013.