Hello,
I am trying to understand comp_type_attributes, which checks whether
attributes are compatible. From what I understand, on many platforms, that
function can only ever return 1. Indeed, it does some checks to know
whether it can answer 1, and if not it forwards to the target, which by
default just returns 1. It looks like it could directly forward to the
target. Which would leave the pretty printer as the only user of the
affects_type_identity property of an attribute...
Now the reason I looked at this is because I was expecting a different
behavior. I added a new (function type) attribute in a front-end and
specified that it affects type identity. When comp_type_attributes sees
this attribute in one type but not the other, it can't answer yes, so it
forwards to the target. The target just answers yes by default (some check
for their own attributes, but they ignore the rest).
Is that what's supposed to happen? I can use another mechanism than
attributes, but this looks suspicious.
--
Marc Glisse
- comp_type_attributes Marc Glisse
-