ast: minor cleanup in is_comptime_type() (#14759)
parent
e4e858b132
commit
7c50d276c7
|
@ -2119,25 +2119,11 @@ pub fn (t &Table) is_comptime_type(x Type, y ComptimeType) bool {
|
||||||
return x_kind == .map
|
return x_kind == .map
|
||||||
}
|
}
|
||||||
.int {
|
.int {
|
||||||
return x_kind in [
|
return x_kind in [.i8, .i16, .int, .i64, .u8, .u16, .u32, .u64, .usize, .isize,
|
||||||
.i8,
|
.int_literal]
|
||||||
.i16,
|
|
||||||
.int,
|
|
||||||
.i64,
|
|
||||||
.u8,
|
|
||||||
.u16,
|
|
||||||
.u32,
|
|
||||||
.u64,
|
|
||||||
.usize,
|
|
||||||
.int_literal,
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
.float {
|
.float {
|
||||||
return x_kind in [
|
return x_kind in [.f32, .f64, .float_literal]
|
||||||
.f32,
|
|
||||||
.f64,
|
|
||||||
.float_literal,
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
.struct_ {
|
.struct_ {
|
||||||
return x_kind == .struct_
|
return x_kind == .struct_
|
||||||
|
|
Loading…
Reference in New Issue