diff options
author | Zahary Karadjov <zahary@gmail.com> | 2014-03-16 11:39:53 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2014-03-16 20:42:06 +0200 |
commit | ac271e76b18110bea8046af64ceccd6b804978dd (patch) | |
tree | 3cecf7bed8b9f5759d766e0ec9e8323277b14b7f /tests/generics | |
parent | 7dcf6ff50b03dfd54968383ad5a4258f040eec1b (diff) | |
download | Nim-ac271e76b18110bea8046af64ceccd6b804978dd.tar.gz |
more robust handling of proc signatures containing inter-param type references
Diffstat (limited to 'tests/generics')
-rw-r--r-- | tests/generics/tsigtypeop.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/generics/tsigtypeop.nim b/tests/generics/tsigtypeop.nim new file mode 100644 index 000000000..4c863cba1 --- /dev/null +++ b/tests/generics/tsigtypeop.nim @@ -0,0 +1,9 @@ +type + Vec3[T] = array[3, T] + +proc foo(x: Vec3, y: Vec3.T, z: x.T): x.type.T = + return 10 + +var y: Vec3[int] = [1, 2, 3] +var z: int = foo(y, 3, 4) + |