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

Add an initial check to simplify pattern matching instanceofs. #4382

Closed
wants to merge 0 commits into from

Conversation

copybara-service[bot]
Copy link
Contributor

Add an initial check to simplify pattern matching instanceofs.

This only handles the simplest case of,

if (x instanceof Foo) {
  var foo = (Foo) x;
  ...
}

While we should also be catching:

if (!(x instanceof Foo)) {
  ...
}
...
var foo = (Foo) x;

That's certainly a bit harder to do, though!

@copybara-service copybara-service bot force-pushed the test_627010635 branch 2 times, most recently from e3f218a to 4ab13de Compare May 2, 2024 12:38
@copybara-service copybara-service bot closed this May 2, 2024
@copybara-service copybara-service bot deleted the test_627010635 branch May 2, 2024 13:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

0 participants