Browse files

Merge pull request #434 from shamanas/refFunc

Fixed index checking for pointers
  • Loading branch information...
2 parents 2b1389d + a8c0344 commit 445d35c420b07836b249faa3777a68a7d06cbd3a @shamanas shamanas committed Jun 13, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 source/rock/middle/ArrayAccess.ooc
View
2 source/rock/middle/ArrayAccess.ooc
@@ -115,7 +115,7 @@ ArrayAccess: class extends Expression {
}
// If we are not dealing with an ooc array or a pointer and we care about type checking, we just return true because a non overloaded access on such a type will be detected elsewhere
- if(!deepDown getType() isPointer() && !deepDown getType() instanceOf?(ArrayType)) {
+ if(deepDown getType() pointerLevel() <= 0 && !deepDown getType() instanceOf?(ArrayType)) {
return true
}
}

0 comments on commit 445d35c

Please sign in to comment.