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:
Jeremy G. Siek
2021-04-22 17:51:43 -04:00
committed by GitHub
parent 8b78a85276
commit 5946d9c033
17 changed files with 98 additions and 26 deletions
+10
View File
@@ -0,0 +1,10 @@
// Part of the Carbon Language project, under the Apache License v2.0 with LLVM
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
// Test the that field order matters for tuples.
fn main() -> Int {
var (.x = Int, .y = Int): t = (.y = 2, .x = 3);
return 0;
}