-rewrite-objc and protocol

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

-rewrite-objc and protocol

Seo Sanghyeon-3
Following Objective C program:

@class C;
@protocol P
@end
@interface I
- (C <P> *) m;
@end
@implementation I
- (C <P> *) m;
{
  return 0;
}
@end

gets rewritten as:

static C<P> * _I_I_m(I * self, SEL _cmd) {
  return 0;
}

which seems clearly wrong. Protocols are not templates.

--
Seo Sanghyeon
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: -rewrite-objc and protocol

jahanian

On Oct 4, 2010, at 12:06 AM, Seo Sanghyeon wrote:

> Following Objective C program:
>
> @class C;
> @protocol P
> @end
> @interface I
> - (C <P> *) m;
> @end
> @implementation I
> - (C <P> *) m;
> {
>  return 0;
> }
> @end
>
> gets rewritten as:
>
> static C<P> * _I_I_m(I * self, SEL _cmd) {
>  return 0;
> }
>
> which seems clearly wrong. Protocols are not templates.

Yes. Please file a bug report.

- fariborz

>
> --
> Seo Sanghyeon
> _______________________________________________
> cfe-dev mailing list
> [hidden email]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev