summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorLemonBoy <LemonBoy@users.noreply.github.com>2018-07-02 00:49:03 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-07-02 00:49:03 +0200
commit2c98b4943efb48cec01a63154bdf2cfb9da61714 (patch)
tree9e0981d97f91d0388d54330cda36b7356153b3d7 /tests
parenta2b2bc1a36a8526fa33e013057a65ae1b7d86b79 (diff)
downloadNim-2c98b4943efb48cec01a63154bdf2cfb9da61714.tar.gz
Fix crash with static and anonymous procs (#8171)
Fixes #6077
Diffstat (limited to 'tests')
-rw-r--r--tests/statictypes/tstatictypes.nim9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/statictypes/tstatictypes.nim b/tests/statictypes/tstatictypes.nim
index 789bd7588..2a3b7332d 100644
--- a/tests/statictypes/tstatictypes.nim
+++ b/tests/statictypes/tstatictypes.nim
@@ -107,3 +107,12 @@ when true:
     assert aw2.data.high == 6
     assert aw3.data.high == 9
 
+# #6077
+block:
+  type
+    Backend = enum
+      Cpu
+
+    Tensor[B: static[Backend]; T] = object
+
+    BackProp[B: static[Backend],T] = proc (gradient: Tensor[B,T]): Tensor[B,T]