Closed cknitt closed 4 years ago
It was not supported but the error message did not report it, so it's fixed. Do you have use case for that?
On Fri, May 29, 2020 at 1:33 PM Christoph Knittel notifications@github.com wrote:
@bobzhang https://github.com/bobzhang In BS7, the following worked:
[@bs.inline]let x = 42.;
In BS 8, it does not work anymore, I get the error message
invalid payload in bs.inline
Revisiting the original issue, I found that you were saying "currently support bs.inline for boolean/int/string" (#3472 (comment) https://github.com/BuckleScript/bucklescript/issues/3472#issuecomment-480799386 ).
So it seems this was only working "by coincidence" in BS7. Still, would be nice to have it in BS8.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/BuckleScript/bucklescript/issues/4426, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAFWMK43GFI32AQD6EZIRS3RT5CMFANCNFSM4NNXLPOA .
-- Regards -- Hongbo Zhang
I think inlined float constants are just as useful as inlined int constants.
One use case that immediately comes to mind are layout constants (widths, heights, margins, opacity values, ...) for bs-css or reason-react-native code.
I would appreciate it if we could get inlined float constants officially supported in BS8.
@bobzhang In BS7, the following worked:
In BS8, it does not work anymore, I get the error message
Revisiting the original issue, I found that you were saying "currently support bs.inline for boolean/int/string" (https://github.com/BuckleScript/bucklescript/issues/3472#issuecomment-480799386).
So it seems this was only working for floats "by coincidence" in BS7. Still, would be nice to have it in BS8.