Skip to content

Commit

Permalink
checker: remove unnecessary string interpolation in deprecation metho…
Browse files Browse the repository at this point in the history
…d calls (#21007)
  • Loading branch information
ttytm committed Mar 13, 2024
1 parent 1e1846f commit fee184b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vlib/v/checker/checker.v
Expand Up @@ -3737,7 +3737,7 @@ fn (mut c Checker) ident(mut node ast.Ident) ast.Type {
node.obj = obj

if obj.attrs.contains('deprecated') && obj.mod != c.mod {
c.deprecate('const', '${obj.name}', obj.attrs, node.pos)
c.deprecate('const', obj.name, obj.attrs, node.pos)
}

if node.or_expr.kind != .absent {
Expand Down Expand Up @@ -3794,7 +3794,7 @@ fn (mut c Checker) ident(mut node ast.Ident) ast.Type {
if node.obj is ast.ConstField {
field := node.obj as ast.ConstField
if field.attrs.contains('deprecated') && field.mod != c.mod {
c.deprecate('const', '${field.name}', field.attrs, node.pos)
c.deprecate('const', field.name, field.attrs, node.pos)
}
}
if builtin_type != ast.void_type {
Expand Down

0 comments on commit fee184b

Please sign in to comment.