ast: fix error in is_int() (#19551)

This commit is contained in:
yuyi 2023-10-12 08:17:00 +08:00 committed by GitHub
parent 2332c17bea
commit 02434807f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -984,7 +984,7 @@ pub fn (t &TypeSymbol) is_int() bool {
res := t.kind in [.i8, .i16, .int, .i64, .i32, .isize, .u8, .u16, .u32, .u64, .usize,
.int_literal, .rune]
if !res && t.kind == .alias {
return (t.info as Alias).parent_type.is_number()
return (t.info as Alias).parent_type.is_int()
}
return res
}