aboutsummaryrefslogtreecommitdiff
path: root/src/Module.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-25 18:27:10 -0700
committerAndrew Kelley <andrew@ziglang.org>2022-03-26 00:27:12 -0400
commitbae35bdf2d8919b60dee9a0af3afbdd93dd72b59 (patch)
treebff6e4b5f81840d82febef78b28e75d9dc1083e3 /src/Module.zig
parentbcd7eb012ac3d4a6365eea0b69aa89b0aef57243 (diff)
downloadzig-bae35bdf2d8919b60dee9a0af3afbdd93dd72b59.tar.gz
zig-bae35bdf2d8919b60dee9a0af3afbdd93dd72b59.zip
stage2: result location types for function call arguments
* AstGen: restore the param_type ZIR instruction and pass it to the expression for function call arguments. This does not solve the problem for generic function parameters, but it catches stage2 up to stage1 which also does not solve the problem for generic function parameters. - Most of the enhancements in this commit will still be needed for a more sophisticated further improvement to handle generic function types. - In Sema, handling of `as` coercion recognizes the `var_args_param` Type Tag and passes the operand through doing no coercion. - That was the last ZIR tag and we are now using all 256 ZIR tags. * AstGen: array init and struct init expressions use the anon form even when the result location has a type. Prevents the type system incorrectly believing, for example, that a tuple is actually an array when the result location is a param_type of a function with `anytype` parameter. * Sema: add missing coercion in `unionInit` to coerce the init to the corresponding union field type. * `Value.fieldValue` now takes a type and does not take an allocator. closes #11293 After this commit, stage2 passes all the parser tests.
Diffstat (limited to 'src/Module.zig')
0 files changed, 0 insertions, 0 deletions