Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deprecate catch <expression> #23487

Merged
merged 1 commit into from
Aug 30, 2017
Merged

deprecate catch <expression> #23487

merged 1 commit into from
Aug 30, 2017

Conversation

JeffBezanson
Copy link
Sponsor Member

@JeffBezanson JeffBezanson commented Aug 28, 2017

Currently, we allow writing catch <whatever>, and look at the <whatever> to decide whether it's a variable (catch ex) or an expression to go inside the catch block. This is not a good situation. This change deprecates everything except catch var<newline> and catch var;. That also gives us space to add features like #23418 in the future.

I've continued to allow literals right after catch since it's clear that they're not identifiers, but I could go either way on that.

addresses #19987

@JeffBezanson JeffBezanson added kind:deprecation This change introduces or involves a deprecation parser Language parsing and surface syntax labels Aug 28, 2017
Copy link
Sponsor Member

@StefanKarpinski StefanKarpinski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would go further and disallow literals as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:deprecation This change introduces or involves a deprecation parser Language parsing and surface syntax
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants