make tests green again
This commit is contained in:
parent
a0cde8cee6
commit
f91a181f58
8 changed files with 18 additions and 55 deletions
|
|
@ -44,16 +44,16 @@ import json
|
|||
type
|
||||
|
||||
foo = object
|
||||
thing: string not nil
|
||||
thing: ptr int not nil
|
||||
|
||||
CTS = ref object
|
||||
subs_by_sid: Table[int, foo]
|
||||
|
||||
|
||||
proc parse(cts: CTS, jn: JsonNode) =
|
||||
|
||||
var y = jn.getInt(4523)
|
||||
let ces = foo(
|
||||
thing: jn.getStr("thing")
|
||||
thing: addr y
|
||||
)
|
||||
|
||||
cts.subs_by_sid[0] = ces
|
||||
|
|
@ -63,17 +63,3 @@ proc parse(cts: CTS, jn: JsonNode) =
|
|||
|
||||
proc p(x: proc(){.closure.} not nil) = discard
|
||||
p(proc(){.closure.} = discard)
|
||||
|
||||
# bug #3993
|
||||
|
||||
type
|
||||
List[T] = seq[T] not nil
|
||||
|
||||
proc `^^`[T](v: T, lst: List[T]): List[T] =
|
||||
result = @[v]
|
||||
result.add(lst)
|
||||
|
||||
proc Nil[T](): List[T] = @[]
|
||||
|
||||
when isMainModule:
|
||||
let lst = 1 ^^ 2 ^^ Nil[int]()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue