v.checker: workaround for `./v wipe-cache && ./v -usecache self && ./v -usecache examples/hello_world.v` errors.
parent
141248f592
commit
9fa805cbbf
|
@ -939,7 +939,7 @@ pub fn (mut c Checker) infix_expr(mut infix_expr ast.InfixExpr) ast.Type {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
mut return_type := left_type
|
mut return_type := left_type
|
||||||
if infix_expr.op != .key_is {
|
if !c.pref.use_cache && infix_expr.op != .key_is {
|
||||||
match mut infix_expr.left {
|
match mut infix_expr.left {
|
||||||
ast.Ident, ast.SelectorExpr {
|
ast.Ident, ast.SelectorExpr {
|
||||||
if infix_expr.left.is_mut {
|
if infix_expr.left.is_mut {
|
||||||
|
@ -5073,7 +5073,7 @@ pub fn (mut c Checker) ident(mut ident ast.Ident) ast.Type {
|
||||||
return info.typ
|
return info.typ
|
||||||
} else if ident.kind == .unresolved {
|
} else if ident.kind == .unresolved {
|
||||||
// first use
|
// first use
|
||||||
if ident.tok_kind == .assign && ident.is_mut {
|
if !c.pref.use_cache && ident.tok_kind == .assign && ident.is_mut {
|
||||||
c.error('`mut` not allowed with `=` (use `:=` to declare a variable)', ident.pos)
|
c.error('`mut` not allowed with `=` (use `:=` to declare a variable)', ident.pos)
|
||||||
}
|
}
|
||||||
if obj := ident.scope.find(ident.name) {
|
if obj := ident.scope.find(ident.name) {
|
||||||
|
|
Loading…
Reference in New Issue