mirror of
https://github.com/nim-lang/Nim.git
synced 2026-07-18 23:11:36 +00:00
{.deprecated: msg.} now works for vars and lets (#10234)
This commit is contained in:
committed by
Andreas Rumpf
parent
d0366c5194
commit
fb26b95f81
9
tests/deprecated/tannot.nim
Normal file
9
tests/deprecated/tannot.nim
Normal file
@@ -0,0 +1,9 @@
|
||||
discard """
|
||||
nimout: '''tannot.nim(9, 1) Warning: efgh; foo1 is deprecated [Deprecated]
|
||||
tannot.nim(9, 8) Warning: abcd; foo is deprecated [Deprecated]
|
||||
'''
|
||||
"""
|
||||
|
||||
let foo* {.deprecated: "abcd".} = 42
|
||||
var foo1* {.deprecated: "efgh".} = 42
|
||||
foo1 = foo
|
||||
@@ -1,7 +0,0 @@
|
||||
discard """
|
||||
errormsg: "annotation to deprecated not supported here"
|
||||
line: 7
|
||||
"""
|
||||
|
||||
var foo* {.deprecated.} = 42
|
||||
var foo1* {.deprecated: "no".} = 42
|
||||
Reference in New Issue
Block a user