compiler: allow to declare C function with pointers with &

pull/1881/head
Henrixounez 2019-09-06 14:13:38 +02:00 committed by Alexander Medvednikov
parent 8ac0a2b2dd
commit bfdab586e3
1 changed files with 1 additions and 1 deletions

View File

@ -686,7 +686,7 @@ fn (p mut Parser) fn_args(f mut Fn) {
} }
// `(int, string, int)` // `(int, string, int)`
// Just register fn arg types // 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 { if types_only {
for p.tok != .rpar { for p.tok != .rpar {
typ := p.get_type() typ := p.get_type()