[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pkl: Fix promotion of initializer in structs
From: |
Mohammad-Reza Nabipoor |
Subject: |
Re: [PATCH] pkl: Fix promotion of initializer in structs |
Date: |
Sun, 13 Dec 2020 22:33:08 +0330 |
Hi, Jose.
On Sun, Dec 13, 2020 at 07:31:01PM +0100, Jose E. Marchesi wrote:
>
> > - if (elem_initializer)
> > + if (elem_initializer &&
> > + !pkl_ast_type_equal_p (PKL_AST_STRUCT_TYPE_FIELD_TYPE (elem),
> > + PKL_AST_TYPE (elem_initializer)))
>
> Please place the && after the line break, not before.
>
> Also, I think it would be better to move the `elem_type' variable to the
> outer environment, to avoid the repetition of
> PKL_AST_STRUCT_TYPE_FIELD_TYPE macro invocation.
>
> Given the above, this is OK for master.
Fixed and pushed.
> Thanks for fixing this!
Thank you for your guidance.
Regards,
Mohammad-Reza