> On Jan 4, 2018, at 8:29 PM, David Zarzycki wrote:
>
> Hi Adrian,
>
> Feel free to file a bug if you’re motivated. Personally speaking, I don’t
> expect this bug to be on anybody’s priority list. The workaround of using
> named structs/unions has no downside for most projects,
Hi Adrian,
Feel free to file a bug if you’re motivated. Personally speaking, I don’t
expect this bug to be on anybody’s priority list. The workaround of using named
structs/unions has no downside for most projects, and Swift is no exception.
Dave
--
Sent from my iPad
> On Jan 4, 2018, at
> On Dec 16, 2017, at 9:08 AM, David Zarzycki via swift-dev
> wrote:
>
> Hello,
>
> I’m trying to improve SILNode memory layout density by adopting the AST
> bitfield macros. Unfortunately, multiple inheritance doesn’t seem to get
> along with anonymous/unnamed unions.
This is expected. The inheritance chain ultimately ends up a B in both cases,
so the reference to j is ambiguous, and the compiler can’t resolve which B is
meant.
This works.
class B
{
protected:
int i;
union { int j; };
};
class C
{
Hello,
I’m trying to improve SILNode memory layout density by adopting the AST
bitfield macros. Unfortunately, multiple inheritance doesn’t seem to get along
with anonymous/unnamed unions. Here is a distillation of the problem:
class B {
protected:
int i;
union { int j; };
};
class X