mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
checker,ci: use c.note for "direct sum type init..."; fixes /v -prod cmd/vls
This commit is contained in:
parent
23a6ce00e2
commit
6daefde5cb
@ -470,7 +470,7 @@ pub fn (mut c Checker) struct_init(mut struct_init ast.StructInit) table.Type {
|
||||
c.ensure_type_exists(utyp, struct_init.pos) or {}
|
||||
type_sym := c.table.get_type_symbol(utyp)
|
||||
if !c.inside_unsafe && type_sym.kind == .sum_type {
|
||||
c.warn('direct sum type init (`x := SumType{}`) will be removed soon', struct_init.pos)
|
||||
c.note('direct sum type init (`x := SumType{}`) will be removed soon', struct_init.pos)
|
||||
}
|
||||
// Make sure the first letter is capital, do not allow e.g. `x := string{}`,
|
||||
// but `x := T{}` is ok.
|
||||
|
Loading…
Reference in New Issue
Block a user