summary refs log tree commit diff stats
path: root/tests/arc/tarcmisc.nim
diff options
context:
space:
mode:
authorClyybber <darkmine956@gmail.com>2021-04-27 13:03:26 +0200
committerGitHub <noreply@github.com>2021-04-27 13:03:26 +0200
commitb03d6c9b2f9d117ed85d410313b7b39e49a16964 (patch)
tree1a55284542e5360a6a3658b439b4599d363501bd /tests/arc/tarcmisc.nim
parenta236002e54d68a672c720bd9b6d27ea0ba44edb8 (diff)
downloadNim-b03d6c9b2f9d117ed85d410313b7b39e49a16964.tar.gz
Fix #17712 (#17873)
Diffstat (limited to 'tests/arc/tarcmisc.nim')
-rw-r--r--tests/arc/tarcmisc.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/arc/tarcmisc.nim b/tests/arc/tarcmisc.nim
index 82751f44c..a52538085 100644
--- a/tests/arc/tarcmisc.nim
+++ b/tests/arc/tarcmisc.nim
@@ -27,6 +27,7 @@ finalizer
 aaaaa
 hello
 ok
+true
 closed
 destroying variable: 20
 destroying variable: 10
@@ -422,3 +423,13 @@ proc test3 =
 
 static: test3() # was buggy
 test3()
+
+# bug #17712
+proc t17712 =
+  var ppv = new int
+  discard @[ppv]
+  var el: ref int
+  el = [ppv][0]
+  echo el != nil
+
+t17712()
href='#n156'>156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256