summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/cpp/Issue_3996.cpp
blob: d2b4479f07290fc30ac7bc1c2c91074e032ad46e (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
#include <iostream>

class OtherClass
{
public:
	int i;
	OtherClass(): i(5) {}
	OtherClass* self() {return this;}
};

class MyClass
{
public:
	OtherClass x;
	int getI();
};

int MyClass::getI() {
	return this->x.self()->i;
}

int main() {
	MyClass c;
	std::cout << c.getI() << std::endl;
}