Open serenity4 opened 3 years ago
Yes the convert
behaviour should be somewhat like that for Dict
and Array
. Currently it’s just not implemented yet. Thanks for the reminder
Addressed on Dictionary
via #67. We can keep this issue open for further work on adding conversion methods to other dictionaries.
Currently,
Base.Dict
allowsbut this fails with
Dictionary
:Would it be possible to define conversion operators that would allow it? Is it a deliberate choice not to define them? It is useful for initializing structs that have dictionary fields, which currently require typing in
Dictionary{K,V}()
withK
andV
potentially long types.Since I believe keys and values are stored in vectors, we could delegate the conversion to conversion between vector types.