File tree 1 file changed +4
-5
lines changed
accepted/future-releases/0546-patterns
1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -688,8 +688,7 @@ to the error than silently accept it.*
688
688
### Object pattern
689
689
690
690
```
691
- objectPattern ::= objectName typeArguments? '(' patternFields? ')'
692
- objectName ::= typeIdentifier | qualifiedName
691
+ objectPattern ::= typeName typeArguments? '(' patternFields? ')'
693
692
```
694
693
695
694
An object pattern matches values of a given named type and then extracts values
@@ -824,12 +823,12 @@ variables like so:
824
823
825
824
```
826
825
localVariableDeclaration ::=
827
- | initializedVariableDeclaration ';' // Existing.
828
- | patternVariableDeclaration ';' // New.
826
+ | metadata initializedVariableDeclaration ';' // Existing.
827
+ | metadata patternVariableDeclaration ';' // New.
829
828
830
829
forLoopParts ::=
831
830
| // Existing productions...
832
- | ( 'final' | 'var' ) outerPattern 'in' expression // New.
831
+ | metadata ( 'final' | 'var' ) outerPattern 'in' expression // New.
833
832
```
834
833
835
834
As with regular for-in loops, it is a compile-time error if the type of
You can’t perform that action at this time.
0 commit comments