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

pull/2270/head
joe-conigliaro 2019-10-09 22:27:23 +11:00 committed by Alexander Medvednikov
parent 80a6d78595
commit 909d3eed0a
1 changed files with 1 additions and 1 deletions

View File

@ -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 {