mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 13:40:11 +03:00
52 lines
596 B
C++
52 lines
596 B
C++
class Mutable
|
|
{
|
|
public:
|
|
virtual ~Mutable();
|
|
virtual void func();
|
|
};
|
|
|
|
Mutable::~Mutable()
|
|
{
|
|
}
|
|
|
|
class DeriveMutable final : public Mutable
|
|
{
|
|
public:
|
|
virtual ~DeriveMutable();
|
|
void func() override;
|
|
};
|
|
|
|
DeriveMutable::~DeriveMutable()
|
|
{
|
|
}
|
|
|
|
class Const
|
|
{
|
|
public:
|
|
virtual ~Const();
|
|
virtual void func() const;
|
|
};
|
|
|
|
Const::~Const()
|
|
{
|
|
}
|
|
|
|
class DeriveConst final : public Const
|
|
{
|
|
public:
|
|
virtual ~DeriveConst();
|
|
void func() const override;
|
|
};
|
|
|
|
DeriveConst::~DeriveConst()
|
|
{
|
|
}
|
|
|
|
void test23135()
|
|
{
|
|
DeriveMutable mut;
|
|
mut.func();
|
|
|
|
DeriveConst cst;
|
|
cst.func();
|
|
}
|