Skip to content

Instantly share code, notes, and snippets.

@cgag
Last active Sep 10, 2017
Embed
What would you like to do?
ir.cpp err
The initial program I tried to run:
```
pub fn main() -> %void {
var m2 = &2;
%%io.stdout.printf("hello: {}\n", m2);
}
```
error:
zig: <...>/zig/src/ir.cpp:10281: TypeTableEntry* ir_analyze_fn_call(IrAnalyze*, IrInstructionCall*, FnTableEntry*, TypeTableEntry*, IrInstruction*, IrInstruction*, bool, bool): Assertion `arg_var != nullptr' failed.
[3] 22448 abort (core dumped) zig build_exe main.zig
I also tried:
```
pub fn main() -> %void {
var x = &2;
var y: u32 = *x;
}
```
error:
<..>/ir.cpp:6980: bool ir_num_lit_fits_in_other_type(IrAnalyze*, IrInstruction*, TypeTableEntry*, bool): Assertion `const_val->special != ConstValSpecialRuntime' failed.
[3] 22106 abort (core dumped) zig build_exe main.zig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment