diff options
Diffstat (limited to 'tests/dll/nimhcr_2_1.nim')
-rw-r--r-- | tests/dll/nimhcr_2_1.nim | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/dll/nimhcr_2_1.nim b/tests/dll/nimhcr_2_1.nim index a13b4c681..705ed6d5a 100644 --- a/tests/dll/nimhcr_2_1.nim +++ b/tests/dll/nimhcr_2_1.nim @@ -7,9 +7,26 @@ type let g_2* = @[Type2(data: 2), Type2(data: 3)][1..^1] # should have a length of 1 +const c_2* = [1, 2, 3] # testing that a complext const object is properly exported + var a: tuple[str: string, i: int] a.str = " 2: random string" echo a.str beforeCodeReload: echo " 2: before!" + +# testing a construct of 2 functions in the same module which reference each other +# https://github.com/nim-lang/Nim/issues/11608 +proc rec_1(depth: int) +proc rec_2(depth: int) = + rec_1(depth + 1) +proc rec_1(depth: int) = + if depth < 3: + rec_2(depth) + else: + echo("max mutual recursion reached!") + +# https://github.com/nim-lang/Nim/issues/11996 +let rec_2_func_ref = rec_2 +rec_2_func_ref(0) |