checker,vweb: reduce noise for private generic methods, while compiling gitly

This commit is contained in:
Delyan Angelov 2023-10-20 03:35:08 +03:00
parent 20a1af3abc
commit 93ff40aeed
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -18,11 +18,14 @@ fn (mut c Checker) fn_decl(mut node ast.FnDecl) {
rec_sym := c.table.sym(node.receiver.typ)
if rec_sym.kind == .struct_ {
if _ := c.table.find_field_with_embeds(rec_sym, 'Context') {
// there is no point in the message here, for methods that are not public; since they will not be available as routes anyway
if node.is_pub {
c.note('generic method routes of vweb will be skipped', node.pos)
}
}
}
}
}
if node.generic_names.len > 0 && c.table.cur_concrete_types.len == 0 {
// Just remember the generic function for now.
// It will be processed later in c.post_process_generic_fns,