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:
parent
80a6d78595
commit
909d3eed0a
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user