1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: show actual field name in warn message

This commit is contained in:
Alexey 2020-04-04 12:57:45 +03:00 committed by GitHub
parent 72df30050d
commit 5313a1401f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -119,7 +119,7 @@ pub fn (c mut Checker) struct_init(struct_init mut ast.StructInit) table.Type {
continue continue
} }
if table.type_is_ptr(field.typ) { if table.type_is_ptr(field.typ) {
c.warn('reference field `Reference.value` must be initialized', struct_init.pos) c.warn('reference field `${typ_sym.name}.${field.name}` must be initialized', struct_init.pos)
} }
} }
} }