mirror of
https://github.com/vlang/v.git
synced 2025-09-17 11:26:17 -04:00
checker,vweb: reduce noise for private generic methods, while compiling gitly
This commit is contained in:
parent
20a1af3abc
commit
93ff40aeed
@ -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,
|
||||
|
Loading…
x
Reference in New Issue
Block a user