summaryrefslogtreecommitdiff
path: root/gcc/testsuite/obj-c++.dg/method-namespace-1.mm
blob: 6095f572ccacdf4dfe25cc22fd86a718ebc25a76 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* Test for usage of namespace inside @implementation. */
/* { dg-do compile } */
@interface MyDocument
@end

@implementation MyDocument

// This deprecated usage works
static void foo1() { }

// This preferred usage does _not_ work
namespace
    {
    void foo2() { }
    }

namespace STD 
    {
	void foo3 () {}
    }

using namespace STD;

- (void) GARF {
  foo2();
  foo3();
}

@end