parser: force visibility of interface methods

pull/4847/head
Alexey 2020-05-11 16:10:26 +03:00 committed by GitHub
parent 828f9af64c
commit 6f2dcd819f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -303,6 +303,7 @@ fn (mut p Parser) interface_decl() ast.InterfaceDecl {
args: args
file: p.file_name
return_type: table.void_type
is_pub: true
}
if p.tok.kind.is_start_of_type() && p.tok.line_nr == line_nr {
method.return_type = p.parse_type()
@ -313,6 +314,7 @@ fn (mut p Parser) interface_decl() ast.InterfaceDecl {
name: name
args: args
return_type: method.return_type
is_pub: true
})
}
p.check(.rcbr)