-
-
Notifications
You must be signed in to change notification settings - Fork 932
Closed
Labels
A-semanticArea - SemanticArea - SemanticC-cleanupCategory - technical debt or refactoring. Solution not expected to change behaviorCategory - technical debt or refactoring. Solution not expected to change behavior
Description
CatchClause does not need a scope if there's no param e.g. try {} catch {}. Add back #[scope(if(self.param.is_some()))].
As discussed in #4192 (review), there's an argument for making all scopes unconditional. But in my opinion, either way the most important thing is to be consistent, so scopes-related code is easier to reason about.
At present, our policy is not to create a scope if none is needed (because it has no bindings). So we should keep to that policy for CatchClause. If we want to change the policy, we can do that, but we should do it consistently for all scopes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-semanticArea - SemanticArea - SemanticC-cleanupCategory - technical debt or refactoring. Solution not expected to change behaviorCategory - technical debt or refactoring. Solution not expected to change behavior
Type
Fields
Give feedbackPriority
None yet