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

more ui vh fixes

This commit is contained in:
Alexander Medvednikov
2019-11-01 16:10:28 +03:00
parent 59efd42483
commit 80ba8f07b8
3 changed files with 83 additions and 64 deletions

View File

@ -274,7 +274,7 @@ fn (p mut Parser) fn_decl() {
}
f.fn_name_token_idx = p.cur_tok_index()
// init fn
if f.name == 'init' && !f.is_method && f.is_public {
if f.name == 'init' && !f.is_method && f.is_public && !p.is_vh {
p.error('init function cannot be public')
}
// C function header def? (fn C.NSMakeRect(int,int,int,int))