From 26474235021e82e64f41b299dc3acb81126909fa Mon Sep 17 00:00:00 2001 From: def Date: Wed, 18 Feb 2015 01:55:50 +0100 Subject: [PATCH] Fix documentations for declared (instead of defined) --- compiler/semgnrc.nim | 2 +- lib/system.nim | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/semgnrc.nim b/compiler/semgnrc.nim index 13941fa58..2601f05ac 100644 --- a/compiler/semgnrc.nim +++ b/compiler/semgnrc.nim @@ -243,7 +243,7 @@ proc semGenericStmt(c: PContext, n: PNode, elif fn.kind == nkDotExpr: result.sons[0] = fuzzyLookup(c, fn, flags, ctx, mixinContext) first = 1 - # Consider 'when defined(globalsSlot): ThreadVarSetValue(globalsSlot, ...)' + # Consider 'when declared(globalsSlot): ThreadVarSetValue(globalsSlot, ...)' # in threads.nim: the subtle preprocessing here binds 'globalsSlot' which # is not exported and yet the generic 'threadProcWrapper' works correctly. let flags = if mixinContext: flags+{withinMixin} else: flags diff --git a/lib/system.nim b/lib/system.nim index b86ab7080..accc2ef25 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -124,7 +124,7 @@ proc declared*(x: expr): bool {.magic: "Defined", noSideEffect.} ## feature or not: ## ## .. code-block:: Nim - ## when not defined(strutils.toUpper): + ## when not declared(strutils.toUpper): ## # provide our own toUpper proc here, because strutils is ## # missing it.