diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 347caa59ad..53966f066e 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -370,17 +370,17 @@ pub fn (mut c Checker) struct_decl(decl ast.StructDecl) { } if field.default_expr is ast.IntegerLiteral as lit { if lit.val == '0' { - c.error('unnecessary default value of `0`: struct fields are zeroed by default', + c.warn('unnecessary default value of `0`: struct fields are zeroed by default', lit.pos) } } else if field.default_expr is ast.StringLiteral as lit { if lit.val == '' { - c.error("unnecessary default value of '': struct fields are zeroed by default", + c.warn("unnecessary default value of '': struct fields are zeroed by default", lit.pos) } } else if field.default_expr is ast.BoolLiteral as lit { if lit.val == false { - c.error('unnecessary default value `false`: struct fields are zeroed by default', + c.warn('unnecessary default value `false`: struct fields are zeroed by default', lit.pos) } }