add non-pure dynamic inheritance case

This commit is contained in:
Ryan Fleury
2024-01-16 17:12:38 -08:00
parent 99b2d9d6d0
commit adbe42c907
+25
View File
@@ -1132,6 +1132,25 @@ struct PureChild : Pure
double a = 0;
};
struct Base
{
int x;
int y;
int z;
virtual ~Base() = default;
virtual void Foo() = 0;
};
struct Derived : Base
{
int r;
int g;
int b;
int a;
virtual ~Derived() = default;
virtual void Foo() {a += 1;}
};
struct OverloadedMethods{
int x;
int cool_method(void){
@@ -1342,6 +1361,12 @@ extended_type_coverage_eval_tests(void){
child->Foo();
delete child;
Base *derived = new Derived();
derived->Foo();
derived->Foo();
derived->Foo();
delete derived;
OverloadedMethods overloaded_methods;
{
overloaded_methods.x = 0;