Closed finestructure closed 4 years ago
@finestructure can you try using @OptionalEnum
instead of @Enum
? I'm a bit surprised @Enum
is working there actually.
Sure! I’ll give that a go and report back.
Hmm yeah I'm getting this error when I try to use @Enum
.
Cannot convert value of type 'EnumProperty<Foo, _>' to specified type 'Status?'
Only @OptionalEnum
works for me and I'm not able to recreate the warning there.
I'll try and create a test case in the project but it'll take moment because I've now moved on to using @Enum
and var status: Status
with a default case none
instead of optional.
FYI: I've just tried with @OptionalEnum
and it works fine. I also can't reproduce the original error anymore. Not sure if it was an update in the meantime that fixed it or if something else changed 🤷
I'll close this now - thanks for taking a look! :)
As discussed here: https://discordapp.com/channels/431917998102675485/684159753189982218/704938144323076136
When inserting
nil
for an optional enum:I observe the following message in the console:
There seems to be no adverse effect and saving non-nil enum works fine.