diff options
author | zah <zahary@gmail.com> | 2018-03-24 16:28:09 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-03-24 15:28:09 +0100 |
commit | 121b9e26fb9d1ae6037c806dbb12a3ae0e26ded6 (patch) | |
tree | 94e8a59c483046c06634191ddb75f71f10b2d821 /tests/concepts/tseqofconcept.nim | |
parent | 2e7a0e1cdd1c942df9cfb0310751b7f1f0190f02 (diff) | |
download | Nim-121b9e26fb9d1ae6037c806dbb12a3ae0e26ded6.tar.gz |
Static[T] fixes (#7333)
* fix the usage of unresolved static[T] parameters in proc signatures * fix tsametype and tmacrogenerics * Allow creating composite type classes with concepts and using them in type signatures * Allow integers to be used in ident concatenations * Support using imported C++ generic types in proc signatures * fixes #7230 * closes #7379 * re-enable some metatype tests
Diffstat (limited to 'tests/concepts/tseqofconcept.nim')
-rw-r--r-- | tests/concepts/tseqofconcept.nim | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/concepts/tseqofconcept.nim b/tests/concepts/tseqofconcept.nim new file mode 100644 index 000000000..5e44117ea --- /dev/null +++ b/tests/concepts/tseqofconcept.nim @@ -0,0 +1,19 @@ +discard """ +output: "1\n2\n3" +""" + +type + MyConcept = concept x + someProc(x) + + SomeSeq = seq[MyConcept] + +proc someProc(x:int) = echo x + +proc work (s: SomeSeq) = + for item in s: + someProc item + +var s = @[1, 2, 3] +work s + |