2007-03-01 Paul Brook <paul@codesourcery.com>
[official-gcc.git] / gcc / testsuite / objc.dg / proto-lossage-5.m
blob35c0956ed8ecfcc7372d4d281b5569ef44787961
1 /* Do not lose references to forward-declared protocols.  */
2 /* { dg-do compile } */
3 @class MyBaseClass;
4 @class MyClassThatFails;
5 @protocol _MyProtocol;
7 @interface MyClassThatFails
8 - (MyBaseClass<_MyProtocol> *) aMethod;
9 @end
11 @interface MyBaseClass
12 @end
14 @protocol _MyProtocol
15 @end
17 @implementation MyClassThatFails
18 - (MyBaseClass<_MyProtocol> *) aMethod
20     return 0;
22 @end