Skip to content

Instantly share code, notes, and snippets.

@cgag
Last active September 10, 2017 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cgag/6073b3a882ca981390eaacc4cde4ac15 to your computer and use it in GitHub Desktop.
Save cgag/6073b3a882ca981390eaacc4cde4ac15 to your computer and use it in GitHub Desktop.
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