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