summary refs log tree commit diff stats
path: root/tests/array/tunchecked.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/array/tunchecked.nim')
-rw-r--r--tests/array/tunchecked.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/array/tunchecked.nim b/tests/array/tunchecked.nim
new file mode 100644
index 000000000..f5ac3642d
--- /dev/null
+++ b/tests/array/tunchecked.nim
@@ -0,0 +1,5 @@
+{.boundchecks: on.}
+type Unchecked {.unchecked.} = array[0, char]
+
+var x = cast[ptr Unchecked](alloc(100))
+x[5] = 'x'