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
I came across a scenario where I needed to destructure multiple instances of a record: point1 and point2 that had an optional z coordinate for 3 dimensions. Please see example below
── RECORD PARSE PROBLEM in main.roc ────────────────────────────────────────────
I am partway through parsing a record, but I got stuck here:
14│ {x:x1, y:y1, z: z1 ? 0.0} = p1
The text was updated successfully, but these errors were encountered:
I was curious and looked into this a bit. It looks like the line { x: x1, y: y1, z ? 0.0 } = point1 can compile, but the line { x: x1, y: y1, z: z2 ? 0.0 } = point1 doesn't compile. It seems the root cause that you can't combine the optional record field with the renaming, both of which are needed here.
I came across a scenario where I needed to destructure multiple instances of a record: point1 and point2 that had an optional z coordinate for 3 dimensions. Please see example below
The text was updated successfully, but these errors were encountered: