aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gdc.test/compilable/test15618.d
blob: f99c4417f3717b1a1e262905ef12f7d37d8d341d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class Base
{
    ~this() {}
    size_t x = 4;
}

interface Interface
{
    int Method();
}

class Derived : Base, Interface
{
    size_t y = 5;
    int Method() { return 3; }
}

static assert(Derived.x.offsetof == (void*).sizeof * 2);
static assert(Derived.y.offsetof == (void*).sizeof * 4);