diff options
author | Araq <rumpf_a@web.de> | 2018-08-23 11:30:55 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-08-23 11:30:55 +0200 |
commit | 30597e643fe8818ef1bb6cc93a5c573f92a28ea9 (patch) | |
tree | ea6de7aabdbfc5db583e2dfbaf9f792c8240a63e /tests/concepts/tmonoid.nim | |
parent | cb9e9297fba72c812913376311ca4b7ebd7e007f (diff) | |
parent | 55a86497491586dc1b5ad2f6303d53992b999ab5 (diff) | |
download | Nim-30597e643fe8818ef1bb6cc93a5c573f92a28ea9.tar.gz |
fixes merge conflict
Diffstat (limited to 'tests/concepts/tmonoid.nim')
-rw-r--r-- | tests/concepts/tmonoid.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/concepts/tmonoid.nim b/tests/concepts/tmonoid.nim index 49b3239bd..e0e19adbc 100644 --- a/tests/concepts/tmonoid.nim +++ b/tests/concepts/tmonoid.nim @@ -11,3 +11,15 @@ type Monoid = concept x, y proc z(x: typedesc[int]): int = 0 echo(int is Monoid) + +# https://github.com/nim-lang/Nim/issues/8126 +type AdditiveMonoid* = concept x, y, type T + x + y is T + + # some redundant checks to test an alternative approaches: + type TT = type(x) + x + y is type(x) + x + y is TT + +doAssert(1 is AdditiveMonoid) + |