Make variable decelaration of "Pattern matching" implicit (instead of explicit) #22126
Labels
Area-Language Design
Resolution-External
The behavior lies outside the functionality covered by this repository
Version Used: 15.3.4
Steps to Reproduce:
Expected Behavior:
It would be better to declare apple implicitly, that is, if its already declared, reuse it. if not declare it.
It is reasonable to issue compile time error if type of variables doesn't match.
The same behavior could be applied to other pattern matching like switch statement.
Actual Behavior:
This code causes compile time error, variable can not be declared in this scope.
The text was updated successfully, but these errors were encountered: