code: func (a *stmtCompiler) defineVar(ident *ast.Ident, t Type) *Variable {
  	v, prev := a.block.DefineVar(ident.Name, ident.Pos(), t)
  	if prev != nil {
  		if prev.Pos().IsValid() {
  			a.diagAt(ident.Pos(), "variable %s redeclared in this block\n\tprevious declaration at %s", ident.Name, a.fset.Position(prev.Pos()))
  		} else {
  			a.diagAt(ident.Pos(), "variable %s redeclared in this block", ident.Name)
  		}
  		return nil
  	}
  
  	// Initialize the variable
  	index := v.Index
  	if v.Index >= 0 {
  		a.push(func(v *Thread) { v.f.Vars[index] = t.Zero() })
  	}
  	return v
  }
docs: /*
   * Statement generation helpers
   */