rbs icon indicating copy to clipboard operation
rbs copied to clipboard

Syntax to bound generics of self in method

Open sevenc-nanashi opened this issue 1 year ago • 0 comments

It would be nice if it's possible to bound generics of self.

Example usecase:

class Array[Elem]
  def sort: [Elem < Comparable] () -> ::Array[Elem]
          | [Elem < Comparable]  () { (Elem a, Elem b) -> ::Integer } -> ::Array[Elem]
end

sevenc-nanashi avatar Dec 20 '24 01:12 sevenc-nanashi