From 31668334715b5db3e5691d06d6b43e1e6c544393 Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Sun, 26 Apr 2020 07:03:23 +0200 Subject: [PATCH] parser: fix interface method return type parsing --- vlib/v/parser/struct.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/parser/struct.v b/vlib/v/parser/struct.v index 5d179d23e0..09c067f7e5 100644 --- a/vlib/v/parser/struct.v +++ b/vlib/v/parser/struct.v @@ -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