mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
revert: checker: error if variable used before decleration p1
This commit is contained in:
parent
dc8b82e9a4
commit
7bc9e234a3
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user