mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker: check struct field with default expression (#15151)
This commit is contained in:
@@ -320,7 +320,7 @@ pub fn (mut c Checker) struct_init(mut node ast.StructInit) ast.Type {
|
||||
}
|
||||
if type_sym.name.len == 1 && !isnil(c.table.cur_fn) && c.table.cur_fn.generic_names.len == 0 {
|
||||
c.error('unknown struct `$type_sym.name`', node.pos)
|
||||
return 0
|
||||
return ast.void_type
|
||||
}
|
||||
match type_sym.kind {
|
||||
.placeholder {
|
||||
|
||||
Reference in New Issue
Block a user