diff options
author | Zahary Karadjov <zahary@gmail.com> | 2017-03-24 15:21:29 +0200 |
---|---|---|
committer | Zahary Karadjov <zahary@gmail.com> | 2017-03-24 17:07:30 +0200 |
commit | 905a22d137288bea8017dff42381b64fbe6387cb (patch) | |
tree | a455270f2ff76b283e72d4489db767b0010f0db8 /tests/concepts/t1128.nim | |
parent | 79881bfce0970098b6dc38f6fbb18a86b54c7fad (diff) | |
download | Nim-905a22d137288bea8017dff42381b64fbe6387cb.tar.gz |
close #1128
Diffstat (limited to 'tests/concepts/t1128.nim')
-rw-r--r-- | tests/concepts/t1128.nim | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/concepts/t1128.nim b/tests/concepts/t1128.nim new file mode 100644 index 000000000..7f7525a13 --- /dev/null +++ b/tests/concepts/t1128.nim @@ -0,0 +1,21 @@ +discard """ + output: "true\ntrue" +""" + +type + TFooContainer[T] = object + + TContainer[T] = generic var c + foo(c, T) + +proc foo[T](c: var TFooContainer[T], val: T) = + discard + +proc bar(c: var TContainer) = + discard + +var fooContainer: TFooContainer[int] +echo fooContainer is TFooContainer # true. +echo fooContainer is TFooContainer[int] # true. +fooContainer.bar() + |