mirror of
https://github.com/ziglang/zig.git
synced 2026-02-14 21:38:33 +00:00
fix += not allowed for pointers
This commit is contained in:
parent
b268e3de04
commit
3c55162826
@ -1166,9 +1166,12 @@ static bool is_op_allowed(TypeTableEntry *type, BinOpType op) {
|
||||
case BinOpTypeAssignTimes:
|
||||
case BinOpTypeAssignDiv:
|
||||
case BinOpTypeAssignMod:
|
||||
return type->id == TypeTableEntryIdInt || type->id == TypeTableEntryIdFloat;
|
||||
case BinOpTypeAssignPlus:
|
||||
case BinOpTypeAssignMinus:
|
||||
return type->id == TypeTableEntryIdInt || type->id == TypeTableEntryIdFloat;
|
||||
return type->id == TypeTableEntryIdInt ||
|
||||
type->id == TypeTableEntryIdFloat ||
|
||||
type->id == TypeTableEntryIdPointer;
|
||||
case BinOpTypeAssignBitShiftLeft:
|
||||
case BinOpTypeAssignBitShiftRight:
|
||||
case BinOpTypeAssignBitAnd:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user