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've stumbled across an annoying bug. It shows up when you have a record that you're sending to the server where the first field (in alphabetical order) is of an option-like type, and the second field is of an enum-like type. Here's the smallest example I could make:
datatype bugged = Nothing | Somethingofintdatatype myDt = One | Twotype myRecord = {Bugged: bugged
, MyDt : myDt}
fun rpcTarget (t: myRecord) = return ()val good = {Bugged = Something4, MyDt = One}
val bad = {Bugged = Nothing, MyDt = One}
fun main () : transaction page = return <xml>
<body>
<button onclick={fn _ => rpc (rpcTarget good)}>rpc with good</button>
<button onclick={fn _ => rpc (rpcTarget bad)}>rpc with bad</button>
</body>
</xml>
When you click on the "rpc with bad" button, you'll get this error:
The error won't happen when MyDt is of a primitive type, nor will it happen when Bugged is the last field in the row. The error also won't happen if you use the Basis.option type, instead of making your own option-like datatype.
The text was updated successfully, but these errors were encountered:
I've stumbled across an annoying bug. It shows up when you have a record that you're sending to the server where the first field (in alphabetical order) is of an option-like type, and the second field is of an enum-like type. Here's the smallest example I could make:
When you click on the "rpc with bad" button, you'll get this error:
The error won't happen when MyDt is of a primitive type, nor will it happen when Bugged is the last field in the row. The error also won't happen if you use the Basis.option type, instead of making your own option-like datatype.
The text was updated successfully, but these errors were encountered: