Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix Issue 15618 - [REG-master] Class member layout has been changed, …
…ABI needs to be updated?
- Loading branch information
1 parent
69a20fe
commit 5bebb65
Showing
3 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,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 * 3); |