checker: format checker.v (#12490)

pull/12495/head
yuyi 2021-11-17 21:57:17 +08:00 committed by GitHub
parent 1370516f53
commit 3e1fb22a04
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -639,7 +639,8 @@ pub fn (mut c Checker) struct_decl(mut node ast.StructDecl) {
}
for i, field in node.fields {
if field.typ == ast.any_type {
c.error('struct field cannot be the `any` type, use generics instead', field.type_pos)
c.error('struct field cannot be the `any` type, use generics instead',
field.type_pos)
}
c.ensure_type_exists(field.typ, field.type_pos) or { return }
if field.typ.has_flag(.generic) {