Skip to content

Use || instead | for pattern matching 'or' patterns to free up | for matching union types #16587

Discussion options

You must be logged in to vote

Sorry, got my syntax wrong. I meant

case a: (Cat | Dog) =>

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@therealcisse
Comment options

@sjrd
Comment options

Answer selected by odersky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants