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:
parent
ab6e3d1b3e
commit
39f78e56ee
|
@ -1081,7 +1081,10 @@ checkProcesses = checkDepthM doProcess
|
||||||
where
|
where
|
||||||
doProcess :: Check A.Process
|
doProcess :: Check A.Process
|
||||||
doProcess (A.Assign m vs el)
|
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
|
mapM_ checkWritable vs
|
||||||
checkExpressionList vts el
|
checkExpressionList vts el
|
||||||
doProcess (A.Input _ v im) = doInput v im
|
doProcess (A.Input _ v im) = doInput v im
|
||||||
|
|
Loading…
Reference in New Issue
Block a user