typeLinkingExpr db imps su (Dimension _ expr _) = case typeIdx of
                                                        [tp] -> if elem tp [TypeByte, TypeShort, TypeInt, TypeChar] then [tp] else typeLinkingFailure "Array: index is not an integer"
                                                        _ -> typeLinkingFailure "Array Index Type typeLinkingFailure"
    where
        typeIdx = typeLinkingExpr db imps su expr
typeLinkingExpr db imps su (Dimension _ expr _) = case typeIdx of
                                                        [tp] -> if elem tp [TypeByte, TypeShort, TypeInt, TypeChar] then [tp] else typeLinkingFailure "Array: index is not an integer"
                                                        _ -> typeLinkingFailure "Array Index Type typeLinkingFailure"
    where
        typeIdx = typeLinkingExpr db imps su expr
typeLinkingExpr db imps su (Dimension _ expr _) = case typeIdx of
                                                        [tp] -> if elem tp [TypeByte, TypeShort, TypeInt, TypeChar] then [tp] else typeLinkingFailure "Array: index is not an integer"
                                                        _ -> typeLinkingFailure "Array Index Type typeLinkingFailure"
    where
        typeIdx = typeLinkingExpr db imps su expr