Peer type resolution with unsigned ints and larger signed ints
This commit is contained in:
@@ -12706,11 +12706,13 @@ static ZigType *ir_resolve_peer_types(IrAnalyze *ira, AstNode *source_node, ZigT
|
||||
}
|
||||
|
||||
if (prev_type->id == ZigTypeIdInt &&
|
||||
cur_type->id == ZigTypeIdInt &&
|
||||
prev_type->data.integral.is_signed == cur_type->data.integral.is_signed)
|
||||
cur_type->id == ZigTypeIdInt)
|
||||
{
|
||||
if (cur_type->data.integral.bit_count > prev_type->data.integral.bit_count) {
|
||||
prev_inst = cur_inst;
|
||||
if ((prev_type->data.integral.is_signed == cur_type->data.integral.is_signed) ||
|
||||
(cur_type->data.integral.is_signed && !prev_type->data.integral.is_signed)) {
|
||||
if (cur_type->data.integral.bit_count > prev_type->data.integral.bit_count) {
|
||||
prev_inst = cur_inst;
|
||||
}
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user