1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

checker: use a notice for now

This commit is contained in:
Alexander Medvednikov 2023-01-15 22:38:31 +01:00
parent aba7bcde85
commit 7a9a82879b

View File

@ -3818,7 +3818,7 @@ fn (mut c Checker) index_expr(mut node ast.IndexExpr) ast.Type {
if !c.inside_unsafe && !c.is_builtin_mod && typ_sym.kind == .map && node.or_expr.stmts.len == 0 {
elem_type := c.table.value_type(typ)
if elem_type.is_real_pointer() {
c.warn('accessing a pointer map value requires an `or{}` block outside `unsafe`',
c.note('accessing a pointer map value requires an `or{}` block outside `unsafe`',
node.pos)
}
}