1 /* Ensure that @try/@catch blocks do not mess with types of
2 local objects (other than their volatile bits). */
4 /* { dg-options "-fobjc-exceptions -fnext-runtime" } */
5 /* { dg-do compile } */
7 #include <objc/Object.h>
17 @interface MyClass: Object <Proto2> {
21 - (Object *)parm1: (id)p1 parm2: (id<Proto1>)p2;
26 @implementation MyClass
30 - (Object *)parm1: (id)p1 parm2: (id<Proto1>)p2 {
32 mc2 = p2; /* { dg-warning "type .id <Proto1>. does not conform to the .Proto2. protocol" } */
37 mc1 = p1; /* no warning here! */