This implication was already done de-facto and there were plenty of users and wrapper functions specifically used to handle the "return-like or RegionBranchTerminatorOpInterface" case. These simply existed due to up until recently missing features in ODS.
With the new capabilities of traits, we can make ReturnLike imply RegionBranchTerminatorOpInterface and auto generate proper definitions for its methods.
Various occurrences and wrapper methods used for isa<RegionBranchTerminatorOpInterface>() || hasTrait<ReturnLike>() have all been removed.
This commit is causing errors in our codebase and I'm not sure how to best approach it. We have ReturnLike ops with custom implementations of getMutableSuccessorOperands. https://github.com/tensorflow/tensorflow/blob/675d73c284396a100555300fe2eab5d02f4bd847/tensorflow/core/ir/ops.cc#L1299.
Is it intentional that now there is not way to define custom getMutableSuccessorOperands and add ReturnLike trait at the same time? Or am I missing something and there is a workaround?