diff options
author | flywind <43030857+xflywind@users.noreply.github.com> | 2020-11-11 10:29:17 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-11 10:29:17 +0800 |
commit | 35f8803250d5e12cbff79614cd9f3ef0a622066d (patch) | |
tree | 9c07aff213d4498a727d3760f8e4dac62a666537 | |
parent | bbe49a14ae827b6474d692042406716a3b3dd71f (diff) | |
download | Nim-35f8803250d5e12cbff79614cd9f3ef0a622066d.tar.gz |
close #4318(add testcase for #4318) (#15904)
* close #4318(add testcase for #4318) * Update tests/objects/t4318.nim Co-authored-by: Juan Carlos <juancarlospaco@gmail.com> Co-authored-by: Juan Carlos <juancarlospaco@gmail.com>
-rw-r--r-- | tests/objects/t4318.nim | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/objects/t4318.nim b/tests/objects/t4318.nim new file mode 100644 index 000000000..34ff722f5 --- /dev/null +++ b/tests/objects/t4318.nim @@ -0,0 +1,12 @@ +type + A = object of RootObj + B = object of A + +method identify(a:A) {.base.} = echo "A" +method identify(b:B) = echo "B" + +var b: B + +doAssertRaises(ObjectAssignmentDefect): + var a: A = b + discard a |