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

ast: fix new_struct := MyStruct{...(*old_struct)} (#8544)

This commit is contained in:
BigBlack
2021-02-04 15:14:43 +08:00
committed by GitHub
parent 27239db427
commit 162c42dbe9
2 changed files with 10 additions and 0 deletions

View File

@@ -1254,6 +1254,8 @@ pub fn (expr Expr) is_lvalue() bool {
CTempVar { return true }
IndexExpr { return expr.left.is_lvalue() }
SelectorExpr { return expr.expr.is_lvalue() }
ParExpr { return expr.expr.is_lvalue() } // for var := &{...(*pointer_var)}
PrefixExpr { return expr.right.is_lvalue() }
else {}
}
return false