[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pkl: Disallow labels in unions
From: |
Mohammad-Reza Nabipoor |
Subject: |
Re: [PATCH] pkl: Disallow labels in unions |
Date: |
Wed, 19 Jan 2022 20:02:47 +0330 |
Hi, Jose.
On Wed, Jan 19, 2022 at 05:22:39PM +0100, Jose E. Marchesi wrote:
>
> Hi Mohammad.
>
> > -Note that, unlike structs, unions cannot be pinned.
> > +Note that, unlike structs, unions cannot be pinned. And, like pinned
> > +structs, they cannot have labels.
>
> That's a very confusing phrasing.
>
> What about something like this:
>
> ---
> It makes little sense to mark union types as pinned, since whatever
> alternative is chosen will always be located at the beginning of the
> union. To avoid unneccesary confusion, the Poke compiler will emit an
> error if you try to tag an union as pinned.
>
> Similarly, labels are not allowed in union alternatives.
> ---
>
> Other than that the patch is OK for master.
> Thanks.
>
Fixed and pushed.
Thanks!