blob: 34ff722f5ce1ca663be0ebd76bfdc01b596f0e48 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
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
|