some minor fixes

This commit is contained in:
Araq 2014-08-14 22:22:04 +02:00
commit 4ab56d6be0
4 changed files with 4 additions and 4 deletions

View file

@ -127,7 +127,7 @@ proc definedInScope*(x: expr): bool {.
## **Deprecated since version 0.9.6**: Use ``declaredInScope`` instead. ## **Deprecated since version 0.9.6**: Use ``declaredInScope`` instead.
proc declaredInScope*(x: expr): bool {. proc declaredInScope*(x: expr): bool {.
magic: "DefinedInScope", noSideEffect, deprecated.} magic: "DefinedInScope", noSideEffect.}
## Special compile-time procedure that checks whether `x` is ## Special compile-time procedure that checks whether `x` is
## declared in the current scope. `x` has to be an identifier. ## declared in the current scope. `x` has to be an identifier.

View file

@ -3,7 +3,7 @@ discard """
""" """
template myAssert(cond: expr) = template myAssert(cond: expr) =
when rand(3) < 3: when 3 <= 3:
let c = cond.astToStr let c = cond.astToStr
if not cond: if not cond:
echo c, "ugh" echo c, "ugh"

View file

@ -4,7 +4,7 @@ discard """
0 0
0 0
[[a = nil, [[a = nil,
b = nil]] b = nil]]'''
""" """
# bug #1475 # bug #1475

View file

@ -53,7 +53,7 @@ const
targetToExt*: array[TTarget, string] = ["c", "cpp", "m", "js"] targetToExt*: array[TTarget, string] = ["c", "cpp", "m", "js"]
targetToCmd*: array[TTarget, string] = ["c", "cpp", "objc", "js"] targetToCmd*: array[TTarget, string] = ["c", "cpp", "objc", "js"]
when not defined(parseCfgBool): when not declared(parseCfgBool):
# candidate for the stdlib: # candidate for the stdlib:
proc parseCfgBool(s: string): bool = proc parseCfgBool(s: string): bool =
case normalize(s) case normalize(s)