diff options
Diffstat (limited to 'test/SemaObjCXX/void_to_obj.mm')
-rw-r--r-- | test/SemaObjCXX/void_to_obj.mm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/SemaObjCXX/void_to_obj.mm b/test/SemaObjCXX/void_to_obj.mm index 52510c8..7dca9fa 100644 --- a/test/SemaObjCXX/void_to_obj.mm +++ b/test/SemaObjCXX/void_to_obj.mm @@ -9,3 +9,18 @@ void func() { obj = vv; // expected-error{{assigning to 'XX *' from incompatible type 'void *'}} } + +// <rdar://problem/7952457> +@interface I +{ + void* delegate; +} +- (I*) Meth; +- (I*) Meth1; +@end + +@implementation I +- (I*) Meth { return static_cast<I*>(delegate); } +- (I*) Meth1 { return reinterpret_cast<I*>(delegate); } +@end + |