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
This syntax error is due to the parser currently expecting at least one of Int, []Data, Map[Data]Data or ByteArray as an additional switch case in order to detect data-switch vs regular switch. I guess that doesn't work in case you're not interested in any of those cases and just want to look at enums and enum variants. I'll need some time to come up with a consistent way to handle this edge-case.
For the note: the syntax is sadly not perfectly consistent with the rest of the language, but the following should work:
Error:
MyEnum isn't a valid enum member of Data
foo.switch{ (index: Int, fields: Data[]) => ... }
works.Note:
foo.switch{ (index: Int, _) => ... }
gives a syntax error. Not sure if that's as intended.The text was updated successfully, but these errors were encountered: