diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/ccgbugs/t8964.nim | 10 | ||||
-rw-r--r-- | tests/misc/tnoforward.nim | 3 | ||||
-rw-r--r-- | tests/modules/treorder.nim | 3 | ||||
-rw-r--r-- | tests/pragmas/treorder.nim | 5 |
4 files changed, 16 insertions, 5 deletions
diff --git a/tests/ccgbugs/t8964.nim b/tests/ccgbugs/t8964.nim new file mode 100644 index 000000000..5b41e8bdb --- /dev/null +++ b/tests/ccgbugs/t8964.nim @@ -0,0 +1,10 @@ +discard """ + targets: "c cpp" +""" + +from json import JsonParsingError +import marshal + +const nothing = "" +doAssertRaises(JsonParsingError): + var bar = marshal.to[int](nothing) diff --git a/tests/misc/tnoforward.nim b/tests/misc/tnoforward.nim index 342e757b8..3e96e3489 100644 --- a/tests/misc/tnoforward.nim +++ b/tests/misc/tnoforward.nim @@ -2,7 +2,8 @@ discard """ disabled: true """ -{. noforward: on .} +# {. noforward: on .} +{.experimental: "codeReordering".} proc foo(x: int) = bar x diff --git a/tests/modules/treorder.nim b/tests/modules/treorder.nim index 8715e4548..c81715cd8 100644 --- a/tests/modules/treorder.nim +++ b/tests/modules/treorder.nim @@ -6,8 +6,7 @@ defined 3''' """ -{.reorder: on.} -{.experimental.} +{.experimental: "codeReordering".} proc bar(x: T) diff --git a/tests/pragmas/treorder.nim b/tests/pragmas/treorder.nim index 1006af527..659a6f644 100644 --- a/tests/pragmas/treorder.nim +++ b/tests/pragmas/treorder.nim @@ -6,7 +6,8 @@ output:'''0 """ import macros -{.reorder: on .} +# {.reorder: on .} +{.experimental: "codeReordering".} echo foo(-1) echo callWithFoo(0) @@ -71,4 +72,4 @@ macro make(arg: untyped): untyped = proc first(i: int): void = make(second) -var ss {.compileTime.}: string = "" \ No newline at end of file +var ss {.compileTime.}: string = "" |