1
0
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:
Delyan Angelov
2022-10-02 16:24:15 +03:00
parent b158da398b
commit b83d0281e4
4 changed files with 6 additions and 6 deletions

View File

@@ -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
}