diff options
| author | LemonBoy <thatlemon@gmail.com> | 2021-06-06 12:26:15 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-06-06 21:21:42 -0400 |
| commit | fc8791c133c14fe969b9056d8f0e337094ce1461 (patch) | |
| tree | 2748fac999f47ea06ba9a892ae3734ca69ace042 /src | |
| parent | b87c3d5371a277a60e63dc521a44d488f013dbc8 (diff) | |
| download | zig-fc8791c133c14fe969b9056d8f0e337094ce1461.tar.gz zig-fc8791c133c14fe969b9056d8f0e337094ce1461.zip | |
stage1: Allow array-like initialization for tuple types
This small change makes working with tuple types much easier, allowing
the use of anonymous (eg. obtained with meta.ArgsTuple) tuples in more
places without the need for specifying each (quoted!) field name in the
initializer.
Diffstat (limited to 'src')
| -rw-r--r-- | src/stage1/ir.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp index 3604f98ff5..19242a5c42 100644 --- a/src/stage1/ir.cpp +++ b/src/stage1/ir.cpp @@ -16694,7 +16694,7 @@ static IrInstGen *ir_analyze_instruction_container_init_list(IrAnalyze *ira, { // We're now done inferring the type. container_type->data.structure.resolve_status = ResolveStatusUnstarted; - } else if (container_type->id == ZigTypeIdVector) { + } else if (container_type->id == ZigTypeIdVector || is_tuple(container_type)) { // OK } else { ir_add_error(ira, &instruction->base.base, |
