Skip to content

Commit 52f18e3

Browse files
committed
fix
1 parent f8da25e commit 52f18e3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

vlib/v/checker/assign.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,7 @@ or use an explicit `unsafe{ a[..] }`, if you do not want a copy of the slice.',
921921
v := expr.obj
922922
right_first_type = v.typ
923923
}
924-
if is_amp && expr.obj is ast.ConstField {
924+
if is_amp && !node.left[0].is_blank_ident() && expr.obj is ast.ConstField {
925925
c.error('cannot have mutable reference to const `${expr.name}`',
926926
right_node.pos)
927927
}

0 commit comments

Comments
 (0)