More robust handling of deprecated pragmas (#8696)
Prevent `deprecated` annotations to "slip" up to the parent module and warn about unsupported annotations. Accidentally fixes #7867
This commit is contained in:
parent
bbe5e8326b
commit
cf20c4460c
5 changed files with 64 additions and 9 deletions
23
tests/deprecated/tmodule1.nim
Normal file
23
tests/deprecated/tmodule1.nim
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
discard """
|
||||
nimout: '''tmodule1.nim(11, 8) Warning: goodbye; importme is deprecated [Deprecated]
|
||||
tmodule1.nim(14, 10) Warning: Ty is deprecated [Deprecated]
|
||||
tmodule1.nim(17, 10) Warning: hello; Ty1 is deprecated [Deprecated]
|
||||
tmodule1.nim(20, 8) Warning: aVar is deprecated [Deprecated]
|
||||
tmodule1.nim(22, 3) Warning: aProc is deprecated [Deprecated]
|
||||
tmodule1.nim(23, 3) Warning: hello; aProc1 is deprecated [Deprecated]
|
||||
'''
|
||||
"""
|
||||
|
||||
import importme
|
||||
|
||||
block:
|
||||
var z: Ty
|
||||
z = 0
|
||||
block:
|
||||
var z: Ty1
|
||||
z = 0
|
||||
block:
|
||||
echo aVar
|
||||
block:
|
||||
aProc()
|
||||
aProc1()
|
||||
Loading…
Add table
Add a link
Reference in a new issue