summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorZahary Karadjov <zahary@gmail.com>2013-08-23 00:42:43 +0300
committerZahary Karadjov <zahary@gmail.com>2013-08-23 01:10:20 +0300
commit8682ed9bd0bd8230e779e45cc65c2bfd4661a966 (patch)
tree2cd423d08702aaca03e4c5100fd9deb5b875d6dd /tests
parentfee2a7ecfa883d100e1177b1cc7d738c6cfeaa83 (diff)
downloadNim-8682ed9bd0bd8230e779e45cc65c2bfd4661a966.tar.gz
pass-through of static int generic params to arrays when late instantiation is disabled
Diffstat (limited to 'tests')
-rw-r--r--tests/run/tstaticparams.nim9
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/run/tstaticparams.nim b/tests/run/tstaticparams.nim
index 3e501ed8b..232748356 100644
--- a/tests/run/tstaticparams.nim
+++ b/tests/run/tstaticparams.nim
@@ -1,17 +1,22 @@
 discard """
   file: "tstaticparams.nim"
-  output: "abracadabra\ntest"
+  output: "abracadabra\ntest\n3"
 """
 
 type 
   TFoo[T; Val: expr[string]] = object
     data: array[4, T]
 
+  TBar[T; I: expr[int]] = object
+    data: array[I, T]
+
 proc takeFoo(x: TFoo) =
   echo "abracadabra"
   echo TFoo.Val
 
 var x: TFoo[int, "test"]
-
 takeFoo(x)
 
+var y: TBar[float, 4]
+echo high(y.data)
+