Fix crash with static and anonymous procs (#8171)

Fixes #6077
This commit is contained in:
LemonBoy 2018-07-02 00:49:03 +02:00 • committed by Andreas Rumpf
commit 2c98b4943e
2 changed files with 10 additions and 1 deletions

View file

@ -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]