diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index dd52fd3604..ba3f23e7a3 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -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) } } diff --git a/vlib/vweb/vweb.v b/vlib/vweb/vweb.v index 4ab0b6bc3f..60728492e5 100644 --- a/vlib/vweb/vweb.v +++ b/vlib/vweb/vweb.v @@ -43,7 +43,7 @@ pub: conn net.Socket form map[string]string // TODO Response -mut: +pub mut: headers string // response headers done bool }