summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.law/scope4.C
blob: 1cfb54e9c34a1be10e0810b820ef2e46e2e6767b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Build don't link: 
// GROUPS passed scoping
// local-class file
// From: daniels@sugar.neosoft.com (Brad Daniels)
// Date:     Thu, 5 Aug 93 15:36:36 CDT
// Subject:  Bug in g++ 2.4.5: Can't touch nested class identifier inside its members
// Message-ID: <9308051536.AA06115@NeoSoft.Com>

void f() {
    class foo {
        int x;
    public:
        foo() : x(1) {}
        int bar() { foo p; return p.x; }
    };
}