rescript-compiler icon indicating copy to clipboard operation
rescript-compiler copied to clipboard

`->` no longer works targeting block expressions

Open TheSpyder opened this issue 3 years ago • 3 comments

I'm not sure when this changed but the following example works on v10 and fails on master: https://rescript-lang.org/try?code=LYewJgrgNgpgBAIQJYDsyoOZwLxwN4BQccALgJ4AO8JBRcAAgM4xpwwAeJMATigIZQ4EZgBUAXHAAUJADRxGJbpgCUOAHxCUSEjjgAiYTBF6CAX1rkqcbjADGIbmADq2gBYjdeAG4CIMCchomAB0JOYEsDr2wABGqDBgujb2jup0yQ5gwT5QfgC0aoTExCBUKIio6CgYdMSGIpJ6rkh6ynTmQA

Screen Shot 2022-07-28 at 8 45 23 pm

It's a bit of a weird structure but it did come up in my production codebase when I was trying to test compiler changes I was working on.

TheSpyder avatar Jul 28 '22 10:07 TheSpyder

We can add this to the release notes.

cristianoc avatar Jul 28 '22 16:07 cristianoc

Ah. I wasn't sure if it was intentional or a bug.

TheSpyder avatar Jul 28 '22 17:07 TheSpyder

The implementation of -> was over complicated and had many bugs. Now it's simpler. That case looks peculiar and has not been reintroduced.

cristianoc avatar Jul 28 '22 17:07 cristianoc