diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 6a627b336a..86a2eee25e 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -256,7 +256,7 @@ pub fn (mut c Checker) struct_init(mut struct_init ast.StructInit) table.Type { } type_sym := c.table.get_type_symbol(struct_init.typ) if !type_sym.is_public && type_sym.kind != .placeholder && type_sym.mod != c.mod { - c.warn('type `$type_sym.name` is private', struct_init.pos) + c.error('type `$type_sym.name` is private', struct_init.pos) } // println('check struct $typ_sym.name') match type_sym.kind {