summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorcooldome <ariabushenko@gmail.com>2020-11-09 10:47:29 +0000
committerGitHub <noreply@github.com>2020-11-09 11:47:29 +0100
commit7b192177984d77355ce67f8cfa4aee227be73e7b (patch)
tree30c5bdebe735347754015dba40ecf5d92eb725d8 /tests
parent673c5990c6b2130dd3b1a4854eb5d85c73a90cd0 (diff)
downloadNim-7b192177984d77355ce67f8cfa4aee227be73e7b.tar.gz
fix #15707 (#15870)
Diffstat (limited to 'tests')
-rw-r--r--tests/arc/t14383.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/arc/t14383.nim b/tests/arc/t14383.nim
index f112a1a6c..834c50def 100644
--- a/tests/arc/t14383.nim
+++ b/tests/arc/t14383.nim
@@ -34,3 +34,17 @@ echo x
 
 import std/os
 discard getFileInfo(".")
+
+
+#------------------------------------------------------------------------------
+# Issue #15707
+#------------------------------------------------------------------------------
+
+type
+  JVMObject = ref object
+proc freeJVMObject(o: JVMObject) =
+  discard
+proc fromJObject(T: typedesc[JVMObject]): T =
+  result.new(cast[proc(r: T) {.nimcall.}](freeJVMObject))
+
+discard JVMObject.fromJObject()
\ No newline at end of file