mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 17:31:07 +01:00
Tuple restrictions (#486)
* implement tuple restrictions: (1) named fields after positional, (2) order matters * after_named_member => seen_named_member
This commit is contained in:
+1
-1
@@ -3,6 +3,6 @@
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
fn main() -> Int {
|
||||
var (.x = Int, Int): t = (3, .x = 2);
|
||||
var (Int, .x = Int): t = (3, .x = 2);
|
||||
return t.x + 1 - t[0];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user