diff options
author | Zahary Karadjov <zahary@gmail.com> | 2013-05-28 19:52:29 +0300 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2013-08-19 01:45:16 +0300 |
commit | 3e79e9f98185148899313da0a7436f861029c10c (patch) | |
tree | 556a5b806b28478c40e67a5df853d8f18d03a990 /tests/compile | |
parent | 8b933e470e46c5f314d81529626c15dab4de228f (diff) | |
download | Nim-3e79e9f98185148899313da0a7436f861029c10c.tar.gz |
some steps to improve the type mismatches with the new
generic instantiation logic
Diffstat (limited to 'tests/compile')
-rw-r--r-- | tests/compile/tgeneric4.nim | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/compile/tgeneric4.nim b/tests/compile/tgeneric4.nim new file mode 100644 index 000000000..f79096636 --- /dev/null +++ b/tests/compile/tgeneric4.nim @@ -0,0 +1,10 @@ +type + TIDGen*[A: Ordinal] = object + next: A + free: seq[A] + +proc newIDGen*[A]: TIDGen[A] = + newSeq result.free, 0 + +var x = newIDGen[int]() + |