lots of small changes

This commit is contained in:
Arne Döring 2018-12-05 19:03:01 +01:00 • committed by Araq
commit a5ecbf823f
85 changed files with 180 additions and 110 deletions

View file

@ -81,7 +81,7 @@ proc debug[T](a: PBinaryTree[T]) =
echo a.data
debug(a.ri)
when isMainModule:
when true:
var
root: PBinaryTree[string]
x = newNode("hello")

View file

@ -10,7 +10,7 @@ type
LBar = object
when isMainModule:
when true:
doAssert FBar.new() == 3
proc new(_: typedesc[LFoo]): int = 0

View file

@ -26,7 +26,7 @@ proc `@||->`*[T](fn: proc(): T {.thread.},
proc `||->`*[T](fn: proc(): T{.thread.}, callback: proc(val: T){.thread.}) =
discard fn @||-> callback
when isMainModule:
when true:
import os
proc testFunc(): int {.thread.} =
return 1

View file

@ -108,7 +108,7 @@ proc `/`*[S](a, b: Vector2D[S]): Vector2D[S] =
proc vec[S](x, y: S): Vector2D[S] =
Vector2D[S](x: x, y: y)
if isMainModule:
if true:
# Comment out this let, and the program will fail to
# compile with a type mismatch, as expected.