mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: make the "reference field must be initialised" warning more informative, fix clipboard (used by ui)
This commit is contained in:
@@ -608,7 +608,7 @@ fn (mut c Checker) check_ref_fields_initialized(struct_sym &ast.TypeSymbol, mut
|
||||
continue
|
||||
}
|
||||
if field.typ.is_ptr() && !field.typ.has_flag(.shared_f) && !field.has_default_expr {
|
||||
c.warn('reference field `${linked_name}.$field.name` must be initialized',
|
||||
c.warn('reference field `${linked_name}.$field.name` must be initialized (part of struct `$struct_sym.name`)',
|
||||
node.pos)
|
||||
continue
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user