poke-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pkl: Fix promotion of initializer in structs


From: Jose E. Marchesi
Subject: Re: [PATCH] pkl: Fix promotion of initializer in structs
Date: Sun, 13 Dec 2020 19:31:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Hi Mohammad.


> -  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.
Thanks for fixing this!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]