diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/collections/critbits.nim | 2 | ||||
-rw-r--r-- | lib/system.nim | 6 | ||||
-rw-r--r-- | lib/system/sysstr.nim | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/pure/collections/critbits.nim b/lib/pure/collections/critbits.nim index 40a02b651..1fde1f419 100644 --- a/lib/pure/collections/critbits.nim +++ b/lib/pure/collections/critbits.nim @@ -131,7 +131,7 @@ proc `[]=`*[T](c: var TCritBitTree[T], key: string, val: T) = var n = rawInsert(c, key) n.val = val -proc `[]`*[T](c: var TCritBitTree[T], key: string): T {.inline.} = +proc `[]`*[T](c: TCritBitTree[T], key: string): T {.inline.} = ## retrieves the value at ``c[key]``. If `key` is not in `t`, ## default empty value for the type `B` is returned ## and no exception is raised. One can check with ``hasKey`` whether the key diff --git a/lib/system.nim b/lib/system.nim index 83428344b..753205777 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -814,9 +814,9 @@ proc `of` *[T, S](x: T, y: S): bool {.magic: "Of", noSideEffect.} ## Checks if `x` has a type of `y` ## ## .. code-block:: Nimrod - ## assert(EFloatingPoint is EBase) - ## assert(EIO is ESystem) - ## assert(EDivByZero is EBase) + ## assert(EFloatingPoint of EBase) + ## assert(EIO of ESystem) + ## assert(EDivByZero of EBase) proc cmp*[T](x, y: T): int {.procvar.} = ## Generic compare proc. Returns a value < 0 iff x < y, a value > 0 iff x > y diff --git a/lib/system/sysstr.nim b/lib/system/sysstr.nim index b3dc9c14e..9db8ce378 100644 --- a/lib/system/sysstr.nim +++ b/lib/system/sysstr.nim @@ -258,7 +258,7 @@ proc nimFloatToStr(f: float): string {.compilerproc.} = if buf[i] == ',': buf[i] = '.' hasDot = true - elif buf[i] in {'e', 'E', '.'}: + elif buf[i] in {'a'..'z', 'A'..'Z', '.'}: hasDot = true if not hasDot: buf[n] = '.' |