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 think this is expected. The first error is an error from the type different since you specified the field is a :string but you provided an int. The second error is because the string key is different from an atom key, which also makes sense.
For example, define a struct named Test with a field called foo of type string:
When calling
new!
with the atom key mapTest.new!(%{foo: 1})
, it will raise an exception:When calling
new!
with the string key mapTest.new!(%{"foo": 1})
, it will raise another exception:I think this is an unexpected behavior, the string key map input's exception should be align with atom key map.
The text was updated successfully, but these errors were encountered: