How to test if Qore object is inherited from a specific class

Viewed 27

When I have more classes, how can I test if instance is derived from a class?

class a {
};
class b inherits a {
};
class c inherits b {
};


a B = new b();
a C = new c();
assert ((B is instance_of b) == (C is instance_of b))

Ugly hack is testing B.className == 'b' but it is wrong for 'C'. I cannot find an operator.

1 Answers
Related