proposed patch for PR 72 (method lookup in interfaces)

Alexandre Petit-Bianco apbianco@cygnus.com
Wed Nov 3 16:19:00 GMT 1999


Godmar Back writes:

> But why, for instance, did I have to say
> CLASS_INTERFACE(TYPE_NAME(clazz)) to determine whether "tree clazz"
> is an interface?  Why wouldn't CLASS_INTERFACE(clazz) work?

Because `clazz' is of RECORD_TYPE, whereas CLASS_INTERFACE works on a
TYPE_DECL (as documented in java-tree.h) You get a TYPE_DECL from a
RECORD_TYPE using TYPE_NAME() -- at least in the Java front-end
world. I agree some of the macros should be renamed. We should have a
TYPE_DECL that transforms into a TYPE_NAME. CLASS_INTERFACE should be
renamed to be CLASS_DECL_INTERFACE and we should write a
CLASS_TYPE_INTERFACE.

./A


More information about the Java mailing list