mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-04 20:17:42 +00:00
some minor fixes
This commit is contained in:
@@ -127,7 +127,7 @@ proc definedInScope*(x: expr): bool {.
|
||||
## **Deprecated since version 0.9.6**: Use ``declaredInScope`` instead.
|
||||
|
||||
proc declaredInScope*(x: expr): bool {.
|
||||
magic: "DefinedInScope", noSideEffect, deprecated.}
|
||||
magic: "DefinedInScope", noSideEffect.}
|
||||
## Special compile-time procedure that checks whether `x` is
|
||||
## declared in the current scope. `x` has to be an identifier.
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ discard """
|
||||
"""
|
||||
|
||||
template myAssert(cond: expr) =
|
||||
when rand(3) < 3:
|
||||
when 3 <= 3:
|
||||
let c = cond.astToStr
|
||||
if not cond:
|
||||
echo c, "ugh"
|
||||
|
||||
@@ -4,7 +4,7 @@ discard """
|
||||
0
|
||||
0
|
||||
[[a = nil,
|
||||
b = nil]]
|
||||
b = nil]]'''
|
||||
"""
|
||||
|
||||
# bug #1475
|
||||
|
||||
@@ -53,7 +53,7 @@ const
|
||||
targetToExt*: array[TTarget, string] = ["c", "cpp", "m", "js"]
|
||||
targetToCmd*: array[TTarget, string] = ["c", "cpp", "objc", "js"]
|
||||
|
||||
when not defined(parseCfgBool):
|
||||
when not declared(parseCfgBool):
|
||||
# candidate for the stdlib:
|
||||
proc parseCfgBool(s: string): bool =
|
||||
case normalize(s)
|
||||
|
||||
Reference in New Issue
Block a user