From 19a1cc914fb8a744243a9730f120f6e932134106 Mon Sep 17 00:00:00 2001 From: Andreas Rumpf Date: Thu, 12 Apr 2018 20:00:01 +0200 Subject: [PATCH] deprecate macros.callsite; fixes #7369 --- changelog.md | 2 ++ lib/core/macros.nim | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index bf90208007..ce2fc08f3d 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 3614cf71ae..4e935c5e87 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