| Daniel Dunbar | 7ad1b1f | 2008-09-04 20:01:15 +0000 | [diff] [blame^] | 1 | // RUN: clang -fsyntax-only -verify %s | 
|  | 2 |  | 
|  | 3 | @protocol P0 | 
|  | 4 | -bar; | 
|  | 5 | @end | 
|  | 6 |  | 
|  | 7 | @interface A <P0> | 
|  | 8 | @end | 
|  | 9 |  | 
|  | 10 | /// Interface conforms to inherited protocol | 
|  | 11 |  | 
|  | 12 | @interface B0 : A <P0> | 
|  | 13 | @end | 
|  | 14 |  | 
|  | 15 | @implementation B0 | 
|  | 16 | @end | 
|  | 17 |  | 
|  | 18 | /// Interface conforms to a protocol which extends another. The other | 
|  | 19 | /// protocol is inherited, and extended methods are implemented. | 
|  | 20 |  | 
|  | 21 | @protocol P1 <P0> | 
|  | 22 | -foo; | 
|  | 23 | @end | 
|  | 24 |  | 
|  | 25 | @interface B1 : A <P1> | 
|  | 26 | @end | 
|  | 27 |  | 
|  | 28 | @implementation B1 | 
|  | 29 | -foo {}; | 
|  | 30 | @end | 
|  | 31 |  | 
|  | 32 | /// Interface conforms to a protocol whose methods are provided by an | 
|  | 33 | /// alternate inherited protocol. | 
|  | 34 |  | 
|  | 35 | @protocol P2 | 
|  | 36 | -bar; | 
|  | 37 | @end | 
|  | 38 |  | 
|  | 39 | @interface B2 : A <P2> | 
|  | 40 | @end | 
|  | 41 |  | 
|  | 42 | @implementation B2 | 
|  | 43 | @end | 
|  | 44 |  | 
|  | 45 | /// Interface conforms to a protocol whose methods are provided by a base class. | 
|  | 46 |  | 
|  | 47 | @interface A1 | 
|  | 48 | -bar; | 
|  | 49 | @end | 
|  | 50 |  | 
|  | 51 | @interface B3 : A1 <P2> | 
|  | 52 | @end | 
|  | 53 |  | 
|  | 54 | @implementation B3 | 
|  | 55 | @end | 
|  | 56 |  |