mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
ast: fix TypeSymbol.is_primitive
, add TypeSymbol.is_bool
(#17106)
This commit is contained in:
parent
0874376db0
commit
b34c55ffd6
@ -854,9 +854,14 @@ pub fn (t &TypeSymbol) is_number() bool {
|
|||||||
return t.is_int() || t.is_float()
|
return t.is_int() || t.is_float()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[inline]
|
||||||
|
pub fn (t &TypeSymbol) is_bool() bool {
|
||||||
|
return t.kind == .bool
|
||||||
|
}
|
||||||
|
|
||||||
[inline]
|
[inline]
|
||||||
pub fn (t &TypeSymbol) is_primitive() bool {
|
pub fn (t &TypeSymbol) is_primitive() bool {
|
||||||
return t.is_number() || t.is_pointer() || t.is_string()
|
return t.is_number() || t.is_pointer() || t.is_string() || t.is_bool()
|
||||||
}
|
}
|
||||||
|
|
||||||
[inline]
|
[inline]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user