I get this error when trying to use destructuring declarations for class properties:
Destructuring declarations are only allowed for local variables/values
So why is it like this? I think destructuring declarations for member and top-level variables are quite pratical. Scala supports pattern matching for members and it doesn’t cause any problems.