Re: testing object inheritance


Subject: Re: testing object inheritance
From: Keunwoo Lee (klee@cs.washington.edu)
Date: Thu Nov 02 2000 - 13:02:41 PST


There is no equivalent of dynamic_cast in Cecil, as I discovered to my
dismay when writing my exceptions lib. Add a temporary method
isa_foo(@foo):bool for each class if you want to do class testing, or a
print_class(@foo) if you want to know about the class.

~k

On Wed, 1 Nov 2000, Sorin Lerner wrote:

> Is there a way in Cecil to determine if an object inherits from another
> object O, even if O is abstrat. I have a variable "node', and I tried
> node.inherits_from(IntLiteralNode). This however caused a run-time error
> because IntLiteralNode is an abstract object. Is there a way around
> this?
>
> Sorin



This archive was generated by hypermail 2b25 : Thu Nov 02 2000 - 13:02:46 PST