summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/concepts/tmonoid.nim13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/concepts/tmonoid.nim b/tests/concepts/tmonoid.nim
new file mode 100644
index 000000000..49b3239bd
--- /dev/null
+++ b/tests/concepts/tmonoid.nim
@@ -0,0 +1,13 @@
+discard """
+  output: '''true'''
+"""
+
+# bug #3686
+
+type Monoid = concept x, y
+  x + y is type(x)
+  type(z(type(x))) is type(x)
+
+proc z(x: typedesc[int]): int = 0
+
+echo(int is Monoid)