Support tuple patterns outside parameter lists (#4923)

Parameter lists need substantially different treatment than tuple
patterns in other contexts, so this change splits them into separate
parse node kinds.

---------

Co-authored-by: Jon Ross-Perkins <jperkins@google.com>
This commit is contained in:
Geoff Romer
2025-02-20 03:17:45 +00:00
committed by GitHub
co-authored by Jon Ross-Perkins
parent 35f5a7f115
commit 74e1a9949f
201 changed files with 1680 additions and 860 deletions
@@ -13,7 +13,7 @@
library "[[@TEST_NAME]]";
interface I {
// CHECK:STDERR: fail_tuple_pattern.carbon:[[@LINE+4]]:7: error: semantics TODO: `tuple pattern in let/var` [SemanticsTodo]
// CHECK:STDERR: fail_tuple_pattern.carbon:[[@LINE+4]]:7: error: pattern in associated constant declaration must be a single `:!` binding [ExpectedSymbolicBindingInAssociatedConstant]
// CHECK:STDERR: let (T:! type, U:! type);
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR:
@@ -25,7 +25,7 @@ interface I {
library "[[@TEST_NAME]]";
interface I {
// CHECK:STDERR: fail_tuple_pattern_with_default.carbon:[[@LINE+4]]:15: error: semantics TODO: `tuple pattern in let/var` [SemanticsTodo]
// CHECK:STDERR: fail_tuple_pattern_with_default.carbon:[[@LINE+4]]:15: error: pattern in associated constant declaration must be a single `:!` binding [ExpectedSymbolicBindingInAssociatedConstant]
// CHECK:STDERR: default let (T:! type, U:! type) = ({}, {});
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~
// CHECK:STDERR: