Deprecated pragma is now supported on enum fields (#10113)
* {.deprecated.} pragma is now supported for enum fields
* Add tests
* Simplify code
This commit is contained in:
parent
a6633b9658
commit
c5ad4c10cb
5 changed files with 63 additions and 12 deletions
10
tests/enum/tenumfieldpragmanoannot.nim
Normal file
10
tests/enum/tenumfieldpragmanoannot.nim
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
discard """
|
||||
errormsg: "annotation to deprecated not supported here"
|
||||
line: 8
|
||||
"""
|
||||
|
||||
type
|
||||
A = enum
|
||||
a {.deprecated: "njshd".}
|
||||
|
||||
var v1 = a
|
||||
Loading…
Add table
Add a link
Reference in a new issue