From 909d3eed0ada74793cf3bba15d294aa53a9d7da8 Mon Sep 17 00:00:00 2001 From: joe-conigliaro Date: Wed, 9 Oct 2019 22:27:23 +1100 Subject: [PATCH] parser: allow all return types when fn used as param ) --- compiler/parser.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/parser.v b/compiler/parser.v index 868c78478e..b032f0e807 100644 --- a/compiler/parser.v +++ b/compiler/parser.v @@ -947,7 +947,7 @@ fn (p mut Parser) get_type() string { p.fn_args(mut f) // Same line, it's a return type if p.scanner.line_nr == line_nr { - if p.tok == .name { + if p.tok in [TokenKind.name, .mul, .amp, .lsbr, .question, .lpar] { f.typ = p.get_type() } else {