diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-11-14 22:59:37 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-14 15:59:37 +0100 |
commit | d901d3b8c564f65b4f2596543b4adaf38fc57327 (patch) | |
tree | 271e1948b34b64a0e3d861b1dda4b5be66dea979 /tests | |
parent | 3eef0491a8ef904abdfe96ab97c566c794305d80 (diff) | |
download | Nim-d901d3b8c564f65b4f2596543b4adaf38fc57327.tar.gz |
fixes #20836; fixes #20833; fixes `unsafeNew` (#20841)
* fixes #20836; fixes `unsafeNew` * fixes #20833
Diffstat (limited to 'tests')
-rw-r--r-- | tests/objects/tunsafenew.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/objects/tunsafenew.nim b/tests/objects/tunsafenew.nim new file mode 100644 index 000000000..6c1b33cd9 --- /dev/null +++ b/tests/objects/tunsafenew.nim @@ -0,0 +1,10 @@ +discard """ + errormsg: "conversion from int literal(-1) to Natural is invalid" +""" + +type + Obj = object + case b: bool + else: discard +var o: ref Obj +unsafeNew(o, -1) \ No newline at end of file |