1
0
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:
Joe Conigliaro 2020-03-22 01:27:10 +11:00
parent 9d80d261b9
commit fc43294efc

View File

@ -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 {