mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: fix pub fn check
This commit is contained in:
parent
7c9279c447
commit
fc67046bac
@ -135,7 +135,7 @@ fn (mut c Checker) check_file_in_main(file ast.File) bool {
|
||||
c.error('function `main` cannot return values', it.pos)
|
||||
}
|
||||
} else {
|
||||
if it.is_pub {
|
||||
if it.is_pub && !it.is_method {
|
||||
c.warn('function `$it.name` $no_pub_in_main_warning', it.pos)
|
||||
}
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ pub:
|
||||
conn net.Socket
|
||||
form map[string]string
|
||||
// TODO Response
|
||||
mut:
|
||||
pub mut:
|
||||
headers string // response headers
|
||||
done bool
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user