'Decorate an implementation of __getattr__ for type *ty* and
the attribute *attr*.
The decorated implementation will have the signature
(context, builder, typ, val).'

def lower_getattr(self, ty, attr):

    def decorate(impl):
        return self._decorate_attr(impl, ty, attr, self.getattrs, _decorate_getattr)
    return decorate
