Merge pull request 'implement-switch-expressions' (#70) from implement-switch-expressions into main

Reviewed-on: #70
This commit is contained in:
Sasha Koshka 2024-03-26 04:55:45 +00:00
commit 6e3125ce62
18 changed files with 701 additions and 39 deletions

View File

@ -475,7 +475,7 @@ func isNumeric (ty entity.Type) bool {
} }
} }
// isInteger returns whether or not the specified type is an integer. // isInteger returns whether or not the specified type is an integer or word.
func isInteger (ty entity.Type) bool { func isInteger (ty entity.Type) bool {
switch ReduceToBase(ty).(type) { switch ReduceToBase(ty).(type) {
case *entity.TypeInt, *entity.TypeWord: return true case *entity.TypeInt, *entity.TypeWord: return true