JD557 commented on PR #1247:
URL: https://github.com/apache/pekko/pull/1247#issuecomment-2056830153

   Regarding delegation, we can also do something like this:
   ```
   def indexOf[B >: Byte](x: B, from: Int): Int = x match {
     case b: Byte => indexOf(b, from) // Delegate to optimized version
     case _ => indexOfWhere(elem == _, from) // Delegate to indexOfWhere
   }
   ```
   
   That way it will never fail at runtime


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to