diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2016-10-19 19:28:27 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2016-10-19 19:28:27 +0200 |
commit | d0ec83eaa8045580900ba878b4005f8429386215 (patch) | |
tree | ce914a3e848cac73f0a41d650c3107498b0a68ef /tests | |
parent | 34b826a64dec8fd575e44ece2efba0d2cdf41311 (diff) | |
download | Nim-d0ec83eaa8045580900ba878b4005f8429386215.tar.gz |
fixes #4863
Diffstat (limited to 'tests')
-rw-r--r-- | tests/generics/tstatictalias.nim | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/generics/tstatictalias.nim b/tests/generics/tstatictalias.nim new file mode 100644 index 000000000..98751b8cb --- /dev/null +++ b/tests/generics/tstatictalias.nim @@ -0,0 +1,20 @@ +discard """ + output: '''G:0,1:0.1 +G:0,1:0.1 +H:1:0.1''' +""" + +type + G[i,j:static[int]] = object + v:float + H[j:static[int]] = G[0,j] +proc p[i,j:static[int]](x:G[i,j]) = echo "G:",i,",",j,":",x.v +proc q[j:static[int]](x:H[j]) = echo "H:",j,":",x.v + +var + g0 = G[0,1](v: 0.1) + h0:H[1] = g0 +p(g0) +p(h0) +q(h0) +# bug #4863 |