checker: check range exprs

pull/4004/head
Joe Conigliaro 2020-03-13 23:08:03 +11:00
parent 973b5c226a
commit 920ab79665
1 changed files with 6 additions and 0 deletions

View File

@ -878,6 +878,12 @@ pub fn (c mut Checker) index_expr(node mut ast.IndexExpr) table.Type {
match node.index {
ast.RangeExpr {
is_range = true
if it.has_low {
c.expr(it.low)
}
if it.has_high {
c.expr(it.high)
}
}
else {}
}