[C++ PATCH] Deprecate -ffriend-injection
[official-gcc.git] / gcc / testsuite / objc.dg / method-15.m
blobd1a675e72cd5a4d316f2a6e8b46d07711fd4b61b
1 /* Test if prior method lookup at method @implementation time is not
2    overly aggressive, leading to methods being found in other classes.  */
3 /* Author: Ziemowit Laski <zlaski@apple.com>.  */
5 /* { dg-do compile } */
7 #include "../objc-obj-c++-shared/TestsuiteObject.h"
8 #include <objc/objc.h>
9 #include "../objc-obj-c++-shared/runtime.h"
11 @class NSString;
13 @protocol NSMenuItem
14 + (void)setUsesUserKeyEquivalents:(BOOL)flag;
15 + (BOOL)usesUserKeyEquivalents;
16 @end
18 @interface NSMenuItem : TestsuiteObject <NSMenuItem> {
19   @private
20   id _menu;
22 @end
24 @interface NSResponder : TestsuiteObject <NSMenuItem>
26   id _nextResponder;
28 @end
30 @interface TestsuiteObject(NSMenuValidation)
31 - (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem;
32 @end
34 @interface NSResponder (NSStandardKeyBindingMethods)
35 - (void)insertText:(id)insertString;
36 - (void)doCommandBySelector:(SEL)aSelector;
37 @end
39 @interface NSView : NSResponder
41   id _superview;
42   id _subviews;
44 @end
46 @interface SKTGraphicView : NSView {
47     @private
48     float _gridSpacing;
50 @end
52 @implementation SKTGraphicView
53 - (BOOL)validateMenuItem:(NSMenuItem *)item {
54   return (BOOL)1;
56 - (void)insertText:(NSString *)str {
58 @end