-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
optional<bytes> differs between struct and tuple only as a parameter #1143
Comments
The issue here is that while type comparison initially invokes |
It looks like no quick fix is possible here. Instead of pushing Unassigning myself for now. |
(deleted my previous comment as it wasn't right.) |
…rce' * origin/topic/robin/gh-1143-optional-coerce: Add coercion on assignment for optionals that only differ in constness of their inner types.
This came up when trying to convert a struct to a tuple in Spicy to pass to Zeek. This same construct worked with
uint64
but failed with a cryptic error when I tried the same thing withbytes
. It's possible other types would meet the same fate. Code and error follow:However, if
bar
is instead declared locally, it compiles without issue:(Fixed code to actually return tuple instead instead of
optional
- Robin).The text was updated successfully, but these errors were encountered: