mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: deref fix
This commit is contained in:
parent
9d80d261b9
commit
fc43294efc
@ -724,6 +724,10 @@ pub fn (c mut Checker) expr(node ast.Expr) table.Type {
|
||||
}
|
||||
res := c.expr(it.right)
|
||||
c.is_amp = false
|
||||
// TODO: impl solid ref/deref strategy
|
||||
if it.op == .mul && table.type_is_ptr(res) {
|
||||
return table.type_deref(res)
|
||||
}
|
||||
return res
|
||||
}
|
||||
ast.None {
|
||||
|
Loading…
Reference in New Issue
Block a user