rbs icon indicating copy to clipboard operation
rbs copied to clipboard

alias method for block declarations

Open HoneyryderChuck opened this issue 4 years ago • 0 comments

For methods with the following signature:

def on: (Symbol) { (*untyped) -> void } -> void

I usually use the following in ruby code:

on(&method(:foo))

This works, but rbs/steep complains:

Cannot pass a value of type `::Method` as a block-pass-argument of type `^(*untyped) -> void`
  ::Method <: ^(*untyped) -> void

I think this should be allowed.

HoneyryderChuck avatar Jul 05 '21 15:07 HoneyryderChuck