From bfdab586e3c6f1c0de251119f921edf62d263e05 Mon Sep 17 00:00:00 2001 From: Henrixounez <30901439+Henrixounez@users.noreply.github.com> Date: Fri, 6 Sep 2019 14:13:38 +0200 Subject: [PATCH] compiler: allow to declare C function with pointers with & --- compiler/fn.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/fn.v b/compiler/fn.v index 75f1a3c522..2e30c36172 100644 --- a/compiler/fn.v +++ b/compiler/fn.v @@ -686,7 +686,7 @@ fn (p mut Parser) fn_args(f mut Fn) { } // `(int, string, int)` // Just register fn arg types - types_only := p.tok == .mul || (p.peek() == .comma && p.table.known_type(p.lit)) || p.peek() == .rpar// (int, string) + types_only := p.tok == .mul || p.tok == .amp || (p.peek() == .comma && p.table.known_type(p.lit)) || p.peek() == .rpar// (int, string) if types_only { for p.tok != .rpar { typ := p.get_type()