This commit is contained in:
Zahary Karadjov
2017-03-24 15:25:11 +02:00
parent 905a22d137
commit e31575c27a

View File

@@ -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)