diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-08-19 15:14:03 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-08-19 15:14:03 +0200 |
commit | 696c0c48c7c794453b79d2abf45c3f390a9b6fba (patch) | |
tree | 8a74e09ce97f64ea0e3377f6440a2e79d54ce0fd /tests/notnil/tmust_compile.nim | |
parent | 7ac6462cbd30bcdb1c3805fbb06be13b3346ce2a (diff) | |
parent | f2263cd129ff41259db99c68e98f966a681adf78 (diff) | |
download | Nim-696c0c48c7c794453b79d2abf45c3f390a9b6fba.tar.gz |
fixes merge conflict
Diffstat (limited to 'tests/notnil/tmust_compile.nim')
-rw-r--r-- | tests/notnil/tmust_compile.nim | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/tests/notnil/tmust_compile.nim b/tests/notnil/tmust_compile.nim index a32c6c7ec..d09dda057 100644 --- a/tests/notnil/tmust_compile.nim +++ b/tests/notnil/tmust_compile.nim @@ -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]() |