You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Note: none of the values are casted to floatlet (x, y) = (ev->DOM.MouseEvent.offsetX, ev->DOM.MouseEvent.offsetY)
// Note: both values are casted to floatlet (x, y) = (ev->DOM.MouseEvent.offsetX, ev->DOM.MouseEvent.offsetY) :> (float, float)
// Note: only first value is casted to floatlet (x, y) = (ev->DOM.MouseEvent.offsetX :> float, ev->DOM.MouseEvent.offsetY)
// Note: only second value is casted to float. *there are parens around the second itemlet (x, y) = (ev->DOM.MouseEvent.offsetX, (ev->DOM.MouseEvent.offsetY :> float))
Not working code:
// Note: coersion in both values// ERROR: Did you forget a `,` here?let (x, y) = (ev->DOM.MouseEvent.offsetX :> float, ev->DOM.MouseEvent.offsetY :> float)
// Note: coersion only in second value// ERROR: Did you forget a `,` here?let (x, y) = (ev->DOM.MouseEvent.offsetX, ev->DOM.MouseEvent.offsetY :> float)
This looks like a bug (or syntax incosistency at least), because type coersion for first item works without parens, but doesn't work for the second (requires parens). It looks like a parser bug.
The text was updated successfully, but these errors were encountered:
Rescript version: 11.1.3
Working code:
Not working code:
This looks like a bug (or syntax incosistency at least), because type coersion for first item works without parens, but doesn't work for the second (requires parens). It looks like a parser bug.
The text was updated successfully, but these errors were encountered: