1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

Revert 'compiler: allow mut passed as argument to be modified'. This broke

This commit is contained in:
Alexander Medvednikov
2019-06-29 11:41:17 +02:00
parent e4bfd32191
commit 249fa95eab
2 changed files with 1 additions and 23 deletions

View File

@@ -1197,7 +1197,7 @@ fn (p mut Parser) name_expr() string {
hack_lit := p.lit
// amp
ptr := p.tok == AMP
mut deref := p.tok == MUL
deref := p.tok == MUL
if ptr || deref {
p.next()
}
@@ -1241,7 +1241,6 @@ fn (p mut Parser) name_expr() string {
// Variable
v := p.cur_fn.find_var(name)
if v.name.len != 0 {
deref = deref || (v.is_arg && v.is_mut && is_mutable_type(v.typ))
if ptr {
p.gen('& /*vvar*/ ')
}