checker,ci: use c.note for "direct sum type init..."; fixes `/v -prod cmd/vls`
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 {}
|
c.ensure_type_exists(utyp, struct_init.pos) or {}
|
||||||
type_sym := c.table.get_type_symbol(utyp)
|
type_sym := c.table.get_type_symbol(utyp)
|
||||||
if !c.inside_unsafe && type_sym.kind == .sum_type {
|
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{}`,
|
// Make sure the first letter is capital, do not allow e.g. `x := string{}`,
|
||||||
// but `x := T{}` is ok.
|
// but `x := T{}` is ok.
|
||||||
|
|
Loading…
Reference in New Issue