Skip to content

Match interfaces that override equals in ReferenceEquality#5683

Merged
copybara-service[bot] merged 1 commit intomasterfrom
test_892252608
Mar 31, 2026
Merged

Match interfaces that override equals in ReferenceEquality#5683
copybara-service[bot] merged 1 commit intomasterfrom
test_892252608

Conversation

@copybara-service
Copy link
Copy Markdown
Contributor

Match interfaces that override equals in ReferenceEquality

If an interface specifies behaviour of equals, ReferenceEquality should suggest using equals for implementations of the interface even if it can't guarantee there's a concrete implementation of equals.

For example, interfaces like List and MemorySegment specify behaviour for equals.

@copybara-service copybara-service bot force-pushed the test_892252608 branch 2 times, most recently from 90319f4 to a693253 Compare March 31, 2026 14:30
If an interface specifies behaviour of `equals`, `ReferenceEquality` should suggest using `equals` for implementations of the interface even if it can't guarantee there's a concrete implementation of equals.

For example, interfaces like `List` and `MemorySegment` specify behaviour for equals.

PiperOrigin-RevId: 892346252
@copybara-service copybara-service bot merged commit 429a509 into master Mar 31, 2026
@copybara-service copybara-service bot deleted the test_892252608 branch March 31, 2026 15:11
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