mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: fix error for 'for smartcast' - part 1 (#13629)
This commit is contained in:
parent
7f8f571ed2
commit
22017ff8f4
@ -1489,7 +1489,7 @@ pub fn (mut t Table) resolve_generic_to_concrete(generic_type Type, generic_name
|
|||||||
mut elem_type := sym.info.elem_type
|
mut elem_type := sym.info.elem_type
|
||||||
mut elem_sym := t.sym(elem_type)
|
mut elem_sym := t.sym(elem_type)
|
||||||
mut dims := 1
|
mut dims := 1
|
||||||
for mut elem_sym.info is Array {
|
for elem_sym.info is Array {
|
||||||
info := elem_sym.info as Array
|
info := elem_sym.info as Array
|
||||||
elem_type = info.elem_type
|
elem_type = info.elem_type
|
||||||
elem_sym = t.sym(elem_type)
|
elem_sym = t.sym(elem_type)
|
||||||
@ -1646,7 +1646,7 @@ pub fn (mut t Table) unwrap_generic_type(typ Type, generic_names []string, concr
|
|||||||
mut elem_type := ts.info.elem_type
|
mut elem_type := ts.info.elem_type
|
||||||
mut elem_sym := t.sym(elem_type)
|
mut elem_sym := t.sym(elem_type)
|
||||||
mut dims := 1
|
mut dims := 1
|
||||||
for mut elem_sym.info is Array {
|
for elem_sym.info is Array {
|
||||||
info := elem_sym.info as Array
|
info := elem_sym.info as Array
|
||||||
elem_type = info.elem_type
|
elem_type = info.elem_type
|
||||||
elem_sym = t.sym(elem_type)
|
elem_sym = t.sym(elem_type)
|
||||||
@ -1857,7 +1857,7 @@ pub fn (mut t Table) replace_generic_type(typ Type, generic_types []Type) {
|
|||||||
mut elem_type := ts.info.elem_type
|
mut elem_type := ts.info.elem_type
|
||||||
mut elem_sym := t.sym(elem_type)
|
mut elem_sym := t.sym(elem_type)
|
||||||
mut dims := 1
|
mut dims := 1
|
||||||
for mut elem_sym.info is Array {
|
for elem_sym.info is Array {
|
||||||
info := elem_sym.info as Array
|
info := elem_sym.info as Array
|
||||||
elem_type = info.elem_type
|
elem_type = info.elem_type
|
||||||
elem_sym = t.sym(elem_type)
|
elem_sym = t.sym(elem_type)
|
||||||
|
@ -2734,7 +2734,7 @@ fn (mut p Parser) dot_expr(left ast.Expr) ast.Expr {
|
|||||||
}
|
}
|
||||||
mut is_mut := false
|
mut is_mut := false
|
||||||
mut mut_pos := token.Pos{}
|
mut mut_pos := token.Pos{}
|
||||||
if p.inside_match || p.inside_if_expr {
|
if p.inside_match || p.inside_if_expr || p.inside_for {
|
||||||
match left {
|
match left {
|
||||||
ast.Ident, ast.SelectorExpr {
|
ast.Ident, ast.SelectorExpr {
|
||||||
is_mut = left.is_mut
|
is_mut = left.is_mut
|
||||||
|
Loading…
Reference in New Issue
Block a user