blob: c0c8ae44e852d724499113f9f49a23ffbf5562b7 [file] [log] [blame]
// { dg-do compile }
// { dg-additional-options "-std=gnu++11 -Wno-return-type" }
enum class nsresult;
class A;
class B
{
public:
B (int);
A *operator->();
};
class C
{
};
class A
{
public:
virtual nsresult AddObserver (const char *, C *, bool) = 0;
};
class D : A
{
nsresult
AddObserver (const char *p1, C *p2, bool p3)
{
AddObserver (p1, p2, p3);
}
};
char *prefList[]{};
class F : C
{
nsresult Install ();
};
nsresult
F::Install ()
{
B branch = 0;
for (int i;;)
branch->AddObserver (prefList[i], this, false);
}