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

ast, parser: fix reference typenode (#15346)

This commit is contained in:
yuyi
2022-08-05 08:01:49 +08:00
committed by GitHub
parent e034b35144
commit 9e50803071
4 changed files with 17 additions and 1 deletions

View File

@@ -607,6 +607,10 @@ fn (mut p Parser) prefix_expr() ast.Expr {
right = right.expr
}
}
if mut right is ast.TypeNode {
right.typ = right.typ.ref()
return right
}
}
mut or_stmts := []ast.Stmt{}
mut or_kind := ast.OrKind.absent