lots of small changes
This commit is contained in:
parent
c0c35839cc
commit
a5ecbf823f
85 changed files with 180 additions and 110 deletions
|
|
@ -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")
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ type
|
|||
LBar = object
|
||||
|
||||
|
||||
when isMainModule:
|
||||
when true:
|
||||
doAssert FBar.new() == 3
|
||||
|
||||
proc new(_: typedesc[LFoo]): int = 0
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue