Relax the type checking on array assignment: [3]INT := []INT is OK.

I'd forgotten to move this rule over from the old checker in the parser.
This commit is contained in:
Adam Sampson 2008-04-06 18:28:02 +00:00
parent ab6e3d1b3e
commit 39f78e56ee

View File

@ -1081,7 +1081,10 @@ checkProcesses = checkDepthM doProcess
where
doProcess :: Check A.Process
doProcess (A.Assign m vs el)
= do vts <- mapM (typeOfVariable) vs
-- We ignore dimensions here because we do the check at runtime.
-- (That is, [2]INT := []INT is legal.)
= do vts <- sequence [typeOfVariable v >>* removeFixedDimensions
| v <- vs]
mapM_ checkWritable vs
checkExpressionList vts el
doProcess (A.Input _ v im) = doInput v im