Fix IsUnsigned
This commit is contained in:
parent
b2f8b85969
commit
d16079cbe8
@ -440,8 +440,8 @@ func isFloat (ty entity.Type) bool {
|
||||
// IsUnsigned returns whether or not the specified type is an unsigned integer.
|
||||
func IsUnsigned (ty entity.Type) bool {
|
||||
switch ty := ReduceToBase(ty).(type) {
|
||||
case *entity.TypeInt: return ty.Signed
|
||||
case *entity.TypeWord: return ty.Signed
|
||||
case *entity.TypeInt: return !ty.Signed
|
||||
case *entity.TypeWord: return !ty.Signed
|
||||
default: return false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user