mirror of
https://codeberg.org/ziglang/zig.git
synced 2025-12-06 05:44:20 +00:00
parent
b483c796c6
commit
5831b68341
2 changed files with 17 additions and 0 deletions
|
|
@ -9098,6 +9098,8 @@ fn nodeMayNeedMemoryLocation(tree: *const Ast, start_node: Ast.Node.Index, have_
|
||||||
.always => return true,
|
.always => return true,
|
||||||
.forward1 => node = node_datas[node].rhs,
|
.forward1 => node = node_datas[node].rhs,
|
||||||
}
|
}
|
||||||
|
// Missing builtin arg is not a parsing error, expect an error later.
|
||||||
|
if (node == 0) return false;
|
||||||
},
|
},
|
||||||
|
|
||||||
.builtin_call, .builtin_call_comma => {
|
.builtin_call, .builtin_call_comma => {
|
||||||
|
|
@ -9112,6 +9114,8 @@ fn nodeMayNeedMemoryLocation(tree: *const Ast, start_node: Ast.Node.Index, have_
|
||||||
.always => return true,
|
.always => return true,
|
||||||
.forward1 => node = params[1],
|
.forward1 => node = params[1],
|
||||||
}
|
}
|
||||||
|
// Missing builtin arg is not a parsing error, expect an error later.
|
||||||
|
if (node == 0) return false;
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
comptime {
|
||||||
|
const v = @as();
|
||||||
|
}
|
||||||
|
comptime {
|
||||||
|
const u = @bitCast(u32);
|
||||||
|
}
|
||||||
|
|
||||||
|
// error
|
||||||
|
// backend=stage2
|
||||||
|
// target=native
|
||||||
|
//
|
||||||
|
// :2:15: error: expected 2 arguments, found 0
|
||||||
|
// :5:15: error: expected 2 arguments, found 1
|
||||||
Loading…
Add table
Reference in a new issue