revert: checker: error if variable used before decleration p1

pull/5423/head^2
joe-conigliaro 2020-06-19 21:37:09 +10:00
parent dc8b82e9a4
commit 7bc9e234a3
No known key found for this signature in database
GPG Key ID: C12F7136C08206F1
1 changed files with 0 additions and 3 deletions

View File

@ -2084,9 +2084,6 @@ pub fn (mut c Checker) ident(mut ident ast.Ident) table.Type {
return obj.typ
}
ast.Var {
if ident.pos.pos < obj.pos.pos {
c.error('variable `$ident.name` used before decleration', ident.pos)
}
mut typ := obj.typ
if typ == 0 {
if obj.expr is ast.Ident {