Closed edward-shen closed 5 years ago
I guess a simple workaround would be to destructure at the next available level, but I think this would be a great feature to add, if it's not a feature yet!
This is because markup creates a struct for the arguments. If you use a pattern on the left side, there's no way to know what the struct field should be called.
Closing as resolved. If you have any other questions, feel free to ask.
Hey!
I'm trying to destructure an struct in a markup parameter:
But the compiler's expecting an
:
where the destructure is occuring.For reference, I can do this in a normal function:
Is this a bug or an unsupported feature?