Currently, the RHS of [T < RHS] must be an interface, class or module, at least what RubyMine IDE identifies. Wynaut allow it to be anything? For the minumum, it can self-document when arg and return are the same constrained object/type: def []=: [E < Elem?] (index name_or_position, E) -> E
Currently, the
RHS
of[T < RHS]
must be an interface, class or module, at least what RubyMine IDE identifies. Wynaut allow it to be anything? For the minumum, it can self-document when arg and return are the same constrained object/type:def []=: [E < Elem?] (index name_or_position, E) -> E
Originally posted in https://github.com/ruby/rbs/pull/1456#discussion_r1306579971; c.c. @sampersand