Made sure that user types are resolved when fixing array constructor types
This commit is contained in:
parent
2edf5cc43d
commit
33ca2fe253
|
@ -58,7 +58,8 @@ fixConstructorTypes = occamOnlyPass "Fix the types of array constructors"
|
||||||
where
|
where
|
||||||
doExpression :: A.Expression -> PassM A.Expression
|
doExpression :: A.Expression -> PassM A.Expression
|
||||||
doExpression (A.Literal m prevT lit@(A.ArrayListLiteral _ expr))
|
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
|
return $ A.Literal m t' lit
|
||||||
where
|
where
|
||||||
getDims :: A.Type -> [A.Dimension]
|
getDims :: A.Type -> [A.Dimension]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user