Commit 022a71ca7d
Changed files (2)
src
src/ir.cpp
@@ -16974,7 +16974,7 @@ static IrInstGen *ir_analyze_bit_shift(IrAnalyze *ira, IrInstSrcBinOp *bin_op_in
if (!instr_is_comptime(op2)) {
ir_add_error(ira, &bin_op_instruction->base.base,
- buf_sprintf("LHS of shift must be an integer type, or RHS must be compile-time known"));
+ buf_sprintf("LHS of shift must be a fixed-width integer type, or RHS must be compile-time known"));
return ira->codegen->invalid_inst_gen;
}
test/compile_errors.zig
@@ -5925,7 +5925,7 @@ pub fn addCases(cases: *tests.CompileErrorContext) void {
\\ return 0x11 << x;
\\}
, &[_][]const u8{
- "tmp.zig:2:17: error: LHS of shift must be an integer type, or RHS must be compile-time known",
+ "tmp.zig:2:17: error: LHS of shift must be a fixed-width integer type, or RHS must be compile-time known",
});
cases.add("shifting RHS is log2 of LHS int bit width",