diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-02-27 23:55:03 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-27 23:55:03 -0500 |
| commit | 0f449a3ec180f710f8b54023d2c3b3dffcce5ec8 (patch) | |
| tree | dc68cb68c5fcdc634f5ccbd8d7f7577ffaed37bf /src/ir.cpp | |
| parent | 439621e44a68b436f958a84fcdb0bdac83613aea (diff) | |
| parent | 9aa65c0e8e6e4135dcc04bcb388d1fa38c6d10f6 (diff) | |
| download | zig-0f449a3ec180f710f8b54023d2c3b3dffcce5ec8.tar.gz zig-0f449a3ec180f710f8b54023d2c3b3dffcce5ec8.zip | |
Merge pull request #796 from bnoordhuis/fix731-more
allow implicit cast from &const to ?&const &const
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index e79235830c..b1fd7104ea 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -8830,7 +8830,8 @@ static IrInstruction *ir_analyze_cast(IrAnalyze *ira, IrInstruction *source_inst } } else if (wanted_child_type->id == TypeTableEntryIdPointer && wanted_child_type->data.pointer.is_const && - is_container(actual_type)) { + (actual_type->id == TypeTableEntryIdPointer || is_container(actual_type))) + { IrInstruction *cast1 = ir_analyze_cast(ira, source_instr, wanted_child_type, value); if (type_is_invalid(cast1->value.type)) return ira->codegen->invalid_instruction; |
