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>.  */
4
5/* { dg-do compile } */
6
7#include "../objc-obj-c++-shared/TestsuiteObject.h"
8#include "../objc-obj-c++-shared/runtime.h"
9
10@class NSString;
11
12@protocol NSMenuItem
13+ (void)setUsesUserKeyEquivalents:(BOOL)flag;
14+ (BOOL)usesUserKeyEquivalents;
15@end
16
17@interface NSMenuItem : TestsuiteObject <NSMenuItem> {
18  @private
19  id _menu;
20}
21@end
22
23@interface NSResponder : TestsuiteObject <NSMenuItem>
24{
25  id _nextResponder;
26}
27@end
28
29@interface TestsuiteObject(NSMenuValidation)
30- (BOOL)validateMenuItem:(id <NSMenuItem>)menuItem;
31@end
32
33@interface NSResponder (NSStandardKeyBindingMethods)
34- (void)insertText:(id)insertString;
35- (void)doCommandBySelector:(SEL)aSelector;
36@end
37
38@interface NSView : NSResponder
39{
40  id _superview;
41  id _subviews;
42}
43@end
44
45@interface SKTGraphicView : NSView {
46  @private
47  float _gridSpacing;
48}
49@end
50
51@implementation SKTGraphicView
52- (BOOL)validateMenuItem:(NSMenuItem *)item {
53  return (BOOL)1;
54}
55- (void)insertText:(NSString *)str {
56}
57@end
58