diff --git a/tests/concepts/tmisc_issues.nim b/tests/concepts/tmisc_issues.nim new file mode 100644 index 000000000..fad1cd6a7 --- /dev/null +++ b/tests/concepts/tmisc_issues.nim @@ -0,0 +1,16 @@ +discard """ +output: '''true''' +""" + +# https://github.com/nim-lang/Nim/issues/1147 +type TTest = object + vals: seq[int] + +proc add*(self: var TTest, val: int) = + self.vals.add(val) + +type CAddable = concept x + x[].add(int) + +echo((ref TTest) is CAddable) +