diff options
Diffstat (limited to 'tests/features/test_tuples.zc')
| -rw-r--r-- | tests/features/test_tuples.zc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/features/test_tuples.zc b/tests/features/test_tuples.zc index bc8b8d8..4bab25d 100644 --- a/tests/features/test_tuples.zc +++ b/tests/features/test_tuples.zc @@ -4,31 +4,31 @@ fn get_pair() -> (int, int) { fn main() { // Inferred type tuple literal - var p = (1, 2); + let p = (1, 2); assert(p.0 == 1, "Tuple access 0"); assert(p.1 == 2, "Tuple access 1"); // Function returning tuple - var p2 = get_pair(); + let p2 = get_pair(); assert(p2.0 == 10, "Tuple return 0"); assert(p2.1 == 20, "Tuple return 1"); // Explicit type tuple - var p3: (int, int) = (5, 6); + let p3: (int, int) = (5, 6); assert(p3.0 == 5, "Explicit tuple 0"); assert(p3.1 == 6, "Explicit tuple 1"); // Different types - var mixed: (int, string) = (10, "Hello"); + let mixed: (int, string) = (10, "Hello"); assert(mixed.0 == 10, "Mixed 0"); assert(strcmp(mixed.1, "Hello") == 0, "Mixed 1 (String)"); // Regression for segfault (inferred tuple with string) - var p_str = (1, "World"); + let p_str = (1, "World"); assert(strcmp(p_str.1, "World") == 0, "Inferred tuple string"); // Tuple destructuring - var (a, b) = get_pair(); + let (a, b) = get_pair(); assert(a == 10, "Destructured a"); assert(b == 20, "Destructured b"); } |
