summaryrefslogtreecommitdiff
path: root/gcc/testsuite/objc.dg/method-8.m
blob: 4a13b7d6cbb57575022ddf16852d29750785f00f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/* Check if casting the receiver type causes method lookup to succeed.  This was broken
   in Objective-C++.  */
/* Contributed by Ziemowit Laski <zlaski@apple.com>  */
/* { dg-do compile } */

@interface A
@end

@interface B: A
- (void)f;
@end

void g(A *p) { [(B *)p f];  }