Skip to content

Refactor isReassigned in PatternMatchingInstanceof to use the local field trick - #6016

Merged
copybara-service[bot] merged 1 commit into
masterfrom
test_962411901
Aug 10, 2026
Merged

Refactor isReassigned in PatternMatchingInstanceof to use the local field trick#6016
copybara-service[bot] merged 1 commit into
masterfrom
test_962411901

Conversation

@copybara-service

Copy link
Copy Markdown
Contributor

Refactor isReassigned in PatternMatchingInstanceof to use the local field trick

Use TreeScanner<Void, Void> with a local boolean field to track reassignment instead of TreeScanner<Boolean, Void> with reduce(). This allows short-circuiting AST traversal once reassignment is found and removes unnecessary boxing/unboxing.

…al field trick

Use `TreeScanner<Void, Void>` with a local `boolean` field to track reassignment instead of `TreeScanner<Boolean, Void>` with `reduce()`. This allows short-circuiting AST traversal once reassignment is found and removes unnecessary boxing/unboxing.

PiperOrigin-RevId: 962436051
@copybara-service
copybara-service Bot merged commit 41c1623 into master Aug 10, 2026
@copybara-service
copybara-service Bot deleted the test_962411901 branch August 10, 2026 23:39
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.

1 participant