xref: /openbsd-src/gnu/usr.bin/gcc/gcc/testsuite/objc/execute/nested-3.m (revision f6aab3d83b51b91c24247ad2c2573574de475a82)
1/* Contributed by Nicola Pero - Fri Mar  9 19:39:15 CET 2001 */
2#include <objc/objc.h>
3
4/* Test defining a nested function inside a method */
5
6@interface Test
7{
8  Class isa;
9}
10+ (int) test;
11@end
12
13@implementation	Test
14
15+ (int) test
16{
17  int test (void)
18    {
19      return 1;
20    }
21
22  return test ();
23}
24
25@end
26
27int main (void)
28{
29  if ([Test test] != 1)
30    {
31      abort ();
32    }
33
34  return 0;
35}
36
37
38