Made sure that user types are resolved when fixing array constructor types

This commit is contained in:
Neil Brown 2009-03-31 16:19:18 +00:00
parent 2edf5cc43d
commit 33ca2fe253

View File

@ -58,7 +58,8 @@ fixConstructorTypes = occamOnlyPass "Fix the types of array constructors"
where
doExpression :: A.Expression -> PassM A.Expression
doExpression (A.Literal m prevT lit@(A.ArrayListLiteral _ expr))
= do t' <- doExpr [] (getDims prevT) expr
= do prevT' <- underlyingType m prevT
t' <- doExpr [] (getDims prevT') expr
return $ A.Literal m t' lit
where
getDims :: A.Type -> [A.Dimension]