parser: fix interface method return type parsing

pull/4601/head
Alexander Medvednikov 2020-04-26 07:03:23 +02:00
parent 9cfb1e3bf7
commit 3166833471
1 changed files with 1 additions and 1 deletions

View File

@ -257,7 +257,7 @@ fn (mut p Parser) interface_decl() ast.InterfaceDecl {
args: args
return_type: table.void_type
}
if p.tok.kind == .name && p.tok.line_nr == line_nr {
if p.tok.kind.is_start_of_type() && p.tok.line_nr == line_nr {
method.return_type = p.parse_type()
}
methods << method