summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-07-17 11:55:19 +0200
committerAraq <rumpf_a@web.de>2017-07-17 16:43:10 +0200
commit81ce73db94ceb02e89ca11738a0212ebf7f03e43 (patch)
treee2a61addf597670e17c1e150d1186ab0fa1bd9f4 /tests
parent30e2af969cb2373b01ec585979db73577a613f93 (diff)
downloadNim-81ce73db94ceb02e89ca11738a0212ebf7f03e43.tar.gz
fixes #5892
Diffstat (limited to 'tests')
-rw-r--r--tests/objects/tobject3.nim19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/objects/tobject3.nim b/tests/objects/tobject3.nim
index f3713ce22..e73065b04 100644
--- a/tests/objects/tobject3.nim
+++ b/tests/objects/tobject3.nim
@@ -89,3 +89,22 @@ echo sizeof(testObject_1)
 echo sizeof(testObject_2)
 echo sizeof(testObject_3[int64])
 echo sizeof(testObject_4[int64])
+
+# bug  #5892
+type
+    Foo6 = distinct array[4, float32]
+    AnotherFoo = distinct array[4, float32]
+
+    AbstractAnimationSampler* = ref object of RootObj
+
+    AnimationSampler*[T] = ref object of AbstractAnimationSampler
+        sampleImpl: proc(s: AnimationSampler[T], p: float): T
+
+    ArrayAnimationSampler*[T] = ref object of AnimationSampler[T]
+
+proc newArrayAnimationSampler*[T](): ArrayAnimationSampler[T] =
+    result.new()
+    result.sampleImpl = nil
+
+discard newArrayAnimationSampler[Foo6]()
+discard newArrayAnimationSampler[AnotherFoo]()