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

parser: allow all return types when fn used as param )

This commit is contained in:
joe-conigliaro 2019-10-09 22:27:23 +11:00 committed by Alexander Medvednikov
parent 80a6d78595
commit 909d3eed0a

View File

@ -947,7 +947,7 @@ fn (p mut Parser) get_type() string {
p.fn_args(mut f) p.fn_args(mut f)
// Same line, it's a return type // Same line, it's a return type
if p.scanner.line_nr == line_nr { 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() f.typ = p.get_type()
} }
else { else {