Rescript-compiler: 7.0.2-dev.1: refmt regression: escaping of "method" breaks JS interop

Created on 20 Dec 2019  路  3Comments  路  Source: rescript-lang/rescript-compiler

Most helpful comment

@cknitt we made a release of 7.0.2-dev.2, feedback is welcome

All 3 comments

@cknitt we made a release of 7.0.2-dev.2, feedback is welcome

@bobzhang Thanks a lot! I have no more issues regarding the method keyword with 7.0.2-dev.2! 馃帀

I have some other refmt issues though (code formatting changes), I will file a separate issue in the Reason repo for these.

@bobzhang I looked again through the format changes I mentioned above and now think that they are actually ok.

The weirdness was caused by us wrapping some expressions in {} unnecessarily in our code , e.g.

editRole(~functions={state.functions});

would get reformatted to

editRole(
  ~functions={
    state.functions;
  },
);

But actually we can just write

editRole(~functions=state.functions);

So from my point of view 7.0.2 is good to go now! 馃憤

Was this page helpful?
0 / 5 - 0 ratings