Skip to content
Snippets Groups Projects
Verified Commit 56f44b11 authored by Ogilvie, D.H. (Duncan)'s avatar Ogilvie, D.H. (Duncan)
Browse files

fixed a type error in fArrayAccess

parent ddecb118
No related branches found
No related tags found
No related merge requests found
......@@ -36,7 +36,7 @@ javaExpToLExprAlgebra = (fLit, fClassLit, fThis, fThisClass, fInstanceCreation,
case arrayType of
(RefType (ArrayType (PrimType IntT))) ->
case indexType of
PrimType IntT -> NArray (Var (TPrim PInt) (prettyPrint name)) [NVar (Var (TPrim PInt) (prettyPrint index))]
PrimType IntT -> NArray (Var (TArray (TPrim PInt)) (prettyPrint name)) [NVar (Var (TPrim PInt) (prettyPrint index))]
_ -> error $ show (arrayIndex, indexType)
_ -> error $ show (arrayIndex, arrayType)
fExpName name env decls = let symbol = prettyPrint name in let t = lookupType decls env name in
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment