summaryrefslogtreecommitdiff
path: root/check.hs
diff options
context:
space:
mode:
authortomsmeding <tom.smeding@gmail.com>2017-02-03 16:30:40 +0100
committertomsmeding <tom.smeding@gmail.com>2017-02-03 16:30:40 +0100
commite72a2b8e778fff230848769643a125ae995fbe58 (patch)
tree23c2aa9b0640b5c2cf57f7e035d5cb6ae33b8e19 /check.hs
parent8eb3171845497a1d6025a3f59c09048d1975cd12 (diff)
Add array indexing (not writing yet, though...)HEADmaster
Diffstat (limited to 'check.hs')
-rw-r--r--check.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/check.hs b/check.hs
index dbbcfd8..18842f6 100644
--- a/check.hs
+++ b/check.hs
@@ -240,6 +240,8 @@ 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 Index (TypePtr t) (TypeInt _) = Just t
+resultTypeBO Index (TypePtr t) (TypeUInt _) = Just t
resultTypeBO _ (TypePtr _) _ = Nothing
resultTypeBO _ _ (TypePtr _) = Nothing