diff options
author | tomsmeding <tom.smeding@gmail.com> | 2017-02-02 09:41:01 +0100 |
---|---|---|
committer | tomsmeding <tom.smeding@gmail.com> | 2017-02-02 09:41:01 +0100 |
commit | 9e67d68574bf4b78451469d5e149cfd95b0ec9f6 (patch) | |
tree | 5a3a8d6f33297a6ade37b58cc79d6df499de8b8d /check.hs | |
parent | 6416151b73b28db208c02b133b058e51b28ff2c8 (diff) |
Pointer arithmetic now also for Minus
string_index.nl now doesn't compile anymore because I need to implement casts
from i32 to u64
Diffstat (limited to 'check.hs')
-rw-r--r-- | check.hs | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -215,7 +215,9 @@ resultTypeBO :: BinaryOperator -> Type -> Type -> Maybe Type resultTypeBO Minus (TypePtr t1) (TypePtr t2) | t1 == t2 = Just $ TypeUInt 1 resultTypeBO bo (TypePtr t1) (TypePtr t2) | t1 == t2 && bo `elem` complogBO = Just $ TypeUInt 1 resultTypeBO bo t@(TypePtr _) (TypeInt _) | bo `elem` [Plus, Minus] = Just t +resultTypeBO bo t@(TypePtr _) (TypeUInt _) | bo `elem` [Plus, Minus] = Just t resultTypeBO bo (TypeInt _) t@(TypePtr _) | bo `elem` [Plus, Minus] = Just t +resultTypeBO bo (TypeUInt _) t@(TypePtr _) | bo `elem` [Plus, Minus] = Just t resultTypeBO _ (TypePtr _) _ = Nothing resultTypeBO _ _ (TypePtr _) = Nothing |