1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

parser: force visibility of interface methods

This commit is contained in:
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

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)