PR inline-asm/84742
[official-gcc.git] / gcc / testsuite / obj-c++.dg / method-2.mm
blobe4973c34e7df45b11cb61b18e96b247e08ca61e4
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-obj-c++-shared/runtime.h"
10 @class NSString;
12 @protocol NSMenuItem
13 + (void)setUsesUserKeyEquivalents:(BOOL)flag;
14 + (BOOL)usesUserKeyEquivalents;
15 @end
17 @interface NSMenuItem : TestsuiteObject <NSMenuItem> {
18   @private
19   id _menu;
21 @end
23 @interface NSResponder : TestsuiteObject <NSMenuItem>
25   id _nextResponder;
27 @end
29 @interface TestsuiteObject(NSMenuValidation)
30 - (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem;
31 @end
33 @interface NSResponder (NSStandardKeyBindingMethods)
34 - (void)insertText:(id)insertString;
35 - (void)doCommandBySelector:(SEL)aSelector;
36 @end
38 @interface NSView : NSResponder
40   id _superview;
41   id _subviews;
43 @end
45 @interface SKTGraphicView : NSView {
46   @private
47   float _gridSpacing;
49 @end
51 @implementation SKTGraphicView
52 - (BOOL)validateMenuItem:(NSMenuItem *)item {
53   return (BOOL)1;
55 - (void)insertText:(NSString *)str {
57 @end