IwanKaramazow / PipeFirst

Fast pipe, pipe first as a syntax transform
28 stars 4 forks source link

"Cannot pipe into expression" when piping into local open #3

Open jchavarri opened 5 years ago

jchavarri commented 5 years ago

This code fails to be processed:

Lwt_js.sleep(1.)
->Lwt.(
    bind(() => {
      print_endline("foo");
      return();
    })
  );

It triggers Error: Cannot pipe into expression.

Without local opening it works ok:

Lwt_js.sleep(1.)
->Lwt.bind(() => {
    print_endline("foo");
    Lwt.return();
  });

Is this expected?

IwanKaramazow commented 5 years ago

Seems I forgot to implement the local open case. Will fix :)