summary refs log tree commit diff stats
path: root/tests/objects/t4318.nim
blob: beadd6909f178e171cb50f04f0f1e0e7e23df7d9 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
discard """
  matrix: "--mm:refc"
"""


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