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