diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-04-12 20:00:01 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-04-12 20:09:44 +0200 |
commit | 19a1cc914fb8a744243a9730f120f6e932134106 (patch) | |
tree | 160a47e157c524d62bc01f0aa809b35e3ecd3efd | |
parent | ea8afebf8cbb3f4cd517f97df3b1db969e857204 (diff) | |
download | Nim-19a1cc914fb8a744243a9730f120f6e932134106.tar.gz |
deprecate macros.callsite; fixes #7369
-rw-r--r-- | changelog.md | 2 | ||||
-rw-r--r-- | lib/core/macros.nim | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/changelog.md b/changelog.md index bf9020800..ce2fc08f3 100644 --- a/changelog.md +++ b/changelog.md @@ -3,6 +3,8 @@ ### Changes affecting backwards compatibility - The stdlib module ``future`` has been renamed to ``sugar``. +- ``macros.callsite`` is now deprecated. Since the introduction of ``varargs`` + parameters this became unnecessary. #### Breaking changes in the standard library diff --git a/lib/core/macros.nim b/lib/core/macros.nim index 3614cf71a..4e935c5e8 100644 --- a/lib/core/macros.nim +++ b/lib/core/macros.nim @@ -361,8 +361,10 @@ proc genSym*(kind: NimSymKind = nskLet; ident = ""): NimNode {. ## generates a fresh symbol that is guaranteed to be unique. The symbol ## needs to occur in a declaration context. -proc callsite*(): NimNode {.magic: "NCallSite", benign.} +proc callsite*(): NimNode {.magic: "NCallSite", benign, + deprecated: "use varargs[untyped] in the macro prototype instead".} ## returns the AST of the invocation expression that invoked this macro. + ## **Deprecated since version 0.18.1**. proc toStrLit*(n: NimNode): NimNode {.compileTime.} = ## converts the AST `n` to the concrete Nim code and wraps that |