diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-08-16 11:27:29 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-08-16 11:38:41 -0400 |
| commit | 13c584d325d042879c8c56a3c41ffbf99a3346c0 (patch) | |
| tree | 8dbe57f0ef8a1da2b9c6db9471a82ebe36aa90aa /src/ir.cpp | |
| parent | cba3b8291a18ee16cda2b453bb2bcd4279fa8b98 (diff) | |
| download | zig-13c584d325d042879c8c56a3c41ffbf99a3346c0.tar.gz zig-13c584d325d042879c8c56a3c41ffbf99a3346c0.zip | |
add compile error for casting const frame to anyframe
See #3063
Diffstat (limited to 'src/ir.cpp')
| -rw-r--r-- | src/ir.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ir.cpp b/src/ir.cpp index 9589000ab0..d6fba23856 100644 --- a/src/ir.cpp +++ b/src/ir.cpp @@ -12112,6 +12112,7 @@ static IrInstruction *ir_analyze_cast(IrAnalyze *ira, IrInstruction *source_inst // *@Frame(func) to anyframe->T or anyframe if (actual_type->id == ZigTypeIdPointer && actual_type->data.pointer.ptr_len == PtrLenSingle && + !actual_type->data.pointer.is_const && actual_type->data.pointer.child_type->id == ZigTypeIdFnFrame && wanted_type->id == ZigTypeIdAnyFrame) { bool ok = true; |
