Fixed the type-checking for the allocation of mobile arrays

This commit is contained in:
Neil Brown 2009-04-15 19:37:19 +00:00
parent 535054eed0
commit d419c89843

View File

@ -347,8 +347,11 @@ checkAllocMobile m rawT me
= do t <- resolveUserType m rawT = do t <- resolveUserType m rawT
case t of case t of
A.Mobile innerT -> A.Mobile innerT ->
do case innerT of do case (innerT, me) of
A.Array ds _ -> ok --mapM_ (checkFullDimension m) ds -- Array dimensions must be known if there's no initialiser.
-- If there is an initialiser, we'll get the dimensions from
-- that.
(A.Array ds _, Nothing) -> mapM_ (checkFullDimension m) ds
_ -> ok _ -> ok
case me of case me of
Just e -> Just e ->