djrieger / mjplusplus

A compiler for the MiniJava language
http://djrieger.github.io/mjplusplus/doc/doxygen/html/
6 stars 1 forks source link

type check array access #43

Closed ratefuchs closed 9 years ago

ratefuchs commented 9 years ago

only array types can be used for array access; index must be an int

djrieger commented 9 years ago

ArrayAccess::isValidType(...) needs to be called somewhere (in ast::PostfixExpression::get_type()?) to check whether index is an int.

djrieger commented 9 years ago

Implemented in 53c9f5763fe0dfaabecf509c60c7b16cef698588