mirror of
https://github.com/vlang/v.git
synced 2025-09-13 14:32:26 +03:00
checker: cleanup - remove unused c.using_new_err_struct (#25036)
This commit is contained in:
parent
1569a821cd
commit
3b7ada1621
1 changed files with 1 additions and 10 deletions
|
@ -124,8 +124,7 @@ mut:
|
||||||
main_fn_decl_node ast.FnDecl
|
main_fn_decl_node ast.FnDecl
|
||||||
match_exhaustive_cutoff_limit int = 10
|
match_exhaustive_cutoff_limit int = 10
|
||||||
is_last_stmt bool
|
is_last_stmt bool
|
||||||
prevent_sum_type_unwrapping_once bool // needed for assign new values to sum type, stopping unwrapping then
|
prevent_sum_type_unwrapping_once bool // needed for assign new values to sum type, stopping unwrapping then
|
||||||
using_new_err_struct bool
|
|
||||||
need_recheck_generic_fns bool // need recheck generic fns because there are cascaded nested generic fn
|
need_recheck_generic_fns bool // need recheck generic fns because there are cascaded nested generic fn
|
||||||
generic_fns map[string]bool // register generic fns that needs recheck once
|
generic_fns map[string]bool // register generic fns that needs recheck once
|
||||||
inside_sql bool // to handle sql table fields pseudo variables
|
inside_sql bool // to handle sql table fields pseudo variables
|
||||||
|
@ -205,7 +204,6 @@ fn (mut c Checker) reset_checker_state_at_start_of_new_file() {
|
||||||
c.cur_orm_ts = ast.TypeSymbol{}
|
c.cur_orm_ts = ast.TypeSymbol{}
|
||||||
c.prevent_sum_type_unwrapping_once = false
|
c.prevent_sum_type_unwrapping_once = false
|
||||||
c.loop_labels = []
|
c.loop_labels = []
|
||||||
c.using_new_err_struct = false
|
|
||||||
c.inside_selector_expr = false
|
c.inside_selector_expr = false
|
||||||
c.inside_interface_deref = false
|
c.inside_interface_deref = false
|
||||||
c.inside_decl_rhs = false
|
c.inside_decl_rhs = false
|
||||||
|
@ -1610,12 +1608,6 @@ fn (mut c Checker) selector_expr(mut node ast.SelectorExpr) ast.Type {
|
||||||
prevent_sum_type_unwrapping_once := c.prevent_sum_type_unwrapping_once
|
prevent_sum_type_unwrapping_once := c.prevent_sum_type_unwrapping_once
|
||||||
c.prevent_sum_type_unwrapping_once = false
|
c.prevent_sum_type_unwrapping_once = false
|
||||||
|
|
||||||
using_new_err_struct_save := c.using_new_err_struct
|
|
||||||
// TODO: remove; this avoids a breaking change in syntax
|
|
||||||
if node.expr is ast.Ident && node.expr.name == 'err' {
|
|
||||||
c.using_new_err_struct = true
|
|
||||||
}
|
|
||||||
|
|
||||||
// T.name, typeof(expr).name
|
// T.name, typeof(expr).name
|
||||||
mut name_type := 0
|
mut name_type := 0
|
||||||
mut node_expr := node.expr
|
mut node_expr := node.expr
|
||||||
|
@ -1683,7 +1675,6 @@ fn (mut c Checker) selector_expr(mut node ast.SelectorExpr) ast.Type {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c.inside_selector_expr = old_selector_expr
|
c.inside_selector_expr = old_selector_expr
|
||||||
c.using_new_err_struct = using_new_err_struct_save
|
|
||||||
if typ == ast.void_type_idx {
|
if typ == ast.void_type_idx {
|
||||||
// This means that the field has an undefined type.
|
// This means that the field has an undefined type.
|
||||||
// This error was handled before.
|
// This error was handled before.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue