E2050 Syntax Errors

Syntax

break and continue can only be used inside a loop

When this occurs

Using an array or map as when condition

Example error message

error[E2050]: when condition cannot be an array or map

How to fix

Arrays and maps cannot be used as when conditions. Use `if/or/otherwise` for collection comparisons.

Related errors