diff options
| author | Tadeo Kondrak <me@tadeo.ca> | 2020-10-05 16:39:51 -0600 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-10-08 04:17:32 -0400 |
| commit | 0e57f220fb71efefa9c6246818758d9c30994f73 (patch) | |
| tree | 8b2ceb2b337f99291ebdadad5257e55fc112cd5b /src/stage1/ir.cpp | |
| parent | eb33394d14e29600d36280b6797de0d8f40076c1 (diff) | |
| download | zig-0e57f220fb71efefa9c6246818758d9c30994f73.tar.gz zig-0e57f220fb71efefa9c6246818758d9c30994f73.zip | |
stage1: Disallow arrays in function parameters or return types
Closes #6535.
Diffstat (limited to 'src/stage1/ir.cpp')
| -rw-r--r-- | src/stage1/ir.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/stage1/ir.cpp b/src/stage1/ir.cpp index 5ab667e831..c90f5f6309 100644 --- a/src/stage1/ir.cpp +++ b/src/stage1/ir.cpp @@ -18963,7 +18963,7 @@ static IrInstGen *ir_analyze_instruction_export(IrAnalyze *ira, IrInstSrcExport break; case ZigTypeIdArray: { bool ok_type; - if ((err = type_allowed_in_extern(ira->codegen, target->value->type->data.array.child_type, &ok_type))) + if ((err = type_allowed_in_extern(ira->codegen, target->value->type->data.array.child_type, ExternPositionOther, &ok_type))) return ira->codegen->invalid_inst_gen; if (!ok_type) { @@ -32745,7 +32745,7 @@ static Error ir_resolve_lazy_raw(AstNode *source_node, ZigValue *val) { return ErrorSemanticAnalyzeFail; } else if (lazy_ptr_type->ptr_len == PtrLenC) { bool ok_type; - if ((err = type_allowed_in_extern(ira->codegen, elem_type, &ok_type))) + if ((err = type_allowed_in_extern(ira->codegen, elem_type, ExternPositionOther, &ok_type))) return err; if (!ok_type) { ir_add_error(ira, &lazy_ptr_type->elem_type->base, |
