From be1cc5fd6e307a1e7f7a56adb571b75f57abe5f6 Mon Sep 17 00:00:00 2001 From: Rex Jaeschke Date: Fri, 23 Jan 2026 06:17:18 -0500 Subject: [PATCH] Support assignment and declaration in same deconstruction --- standard/expressions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/standard/expressions.md b/standard/expressions.md index d73b34946..fbd737319 100644 --- a/standard/expressions.md +++ b/standard/expressions.md @@ -6896,7 +6896,7 @@ The `=` operator is called the simple assignment operator. If the left operand of a simple assignment is of the form `E.P` or `E[Ei]` where `E` has the compile-time type `dynamic`, then the assignment is dynamically bound ([§12.3.3](expressions.md#1233-dynamic-binding)). In this case, the compile-time type of the assignment expression is `dynamic`, and the resolution described below will take place at run-time based on the run-time type of `E`. If the left operand is of the form `E[Ei]` where at least one element of `Ei` has the compile-time type `dynamic`, and the compile-time type of `E` is not an array, the resulting indexer access is dynamically bound, but with limited compile-time checking ([§12.6.5](expressions.md#1265-compile-time-checking-of-dynamic-member-invocation)). -A simple assignment where the left operand is classified as a tuple is also called a ***deconstructing assignment***. If any of the tuple elements of the left operand has an element name, a compile-time error occurs. If any of the tuple elements of the left operand is a *declaration_expression* and any other element is not a *declaration_expression* or a simple discard, a compile-time error occurs. +A simple assignment where the left operand is classified as a tuple is also called a ***deconstructing assignment***. If any of the tuple elements of the left operand has an element name, a compile-time error occurs. The type of a simple assignment `x = y` is the type of an assignment to `x` of `y`, which is recursively determined as follows: