Daniel Dunbar | a572887 | 2009-12-15 20:14:24 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify %s |
Steve Naroff | b558422 | 2009-02-26 11:32:02 +0000 | [diff] [blame] | 2 | @interface NSObject @end |
| 3 | |
| 4 | @protocol ProtocolA |
| 5 | |
| 6 | + (id)classMethod; |
| 7 | - (id)instanceMethod; |
| 8 | |
| 9 | @end |
| 10 | |
| 11 | @protocol ProtocolB <ProtocolA> |
| 12 | |
| 13 | @end |
| 14 | |
| 15 | @interface Foo : NSObject <ProtocolB> |
| 16 | |
| 17 | @end |
| 18 | |
| 19 | @interface SubFoo : Foo |
| 20 | |
| 21 | @end |
| 22 | |
| 23 | @implementation SubFoo |
| 24 | |
| 25 | + (id)method { |
| 26 | return [super classMethod]; |
| 27 | } |
| 28 | |
| 29 | - (id)method { |
| 30 | return [super instanceMethod]; |
| 31 | } |
| 32 | |
| 33 | @end |