diff options
Diffstat (limited to 'tests/method/tmethod_issues.nim')
-rw-r--r-- | tests/method/tmethod_issues.nim | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/method/tmethod_issues.nim b/tests/method/tmethod_issues.nim index df4c3771a..daaa46522 100644 --- a/tests/method/tmethod_issues.nim +++ b/tests/method/tmethod_issues.nim @@ -1,4 +1,5 @@ discard """ + matrix: "--mm:arc; --mm:refc" output: ''' wof! wof! @@ -9,7 +10,7 @@ type B # bug #1659 -type Animal = ref object {.inheritable.} +type Animal {.inheritable.} = ref object type Dog = ref object of Animal method say(a: Animal): auto {.base.} = "wat!" @@ -159,3 +160,11 @@ proc main() = main() +block: # bug #20391 + type Container[T] = ref object of RootRef + item: T + + let a = Container[int]() + + doAssert a of Container[int] + doAssert not (a of Container[string]) |