Unsubscript the context (when walking a subscripted expression.
This commit is contained in:
parent
2d15eb800c
commit
71d8c7024b
|
@ -645,7 +645,11 @@ inferTypes = applyExplicitM9 doExpression doDimension doSubscript
|
||||||
-- FIXME: IntrinsicFunctionCall
|
-- FIXME: IntrinsicFunctionCall
|
||||||
A.SubscriptedExpr m s e ->
|
A.SubscriptedExpr m s e ->
|
||||||
do s' <- inferTypes s
|
do s' <- inferTypes s
|
||||||
e' <- inSubscriptedContext m $ inferTypes e
|
ctx <- getTypeContext
|
||||||
|
ctx' <- case ctx of
|
||||||
|
Just t -> unsubscriptType s t >>* Just
|
||||||
|
Nothing -> return Nothing
|
||||||
|
e' <- inTypeContext ctx' $ inferTypes e
|
||||||
return $ A.SubscriptedExpr m s' e'
|
return $ A.SubscriptedExpr m s' e'
|
||||||
|
|
||||||
-- Other expressions don't modify the type context.
|
-- Other expressions don't modify the type context.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user