okkero
01/30/2017, 10:46 AMsubscribe
expects a function that either takes one parameter of some type T
, or has a receiver of some type T
and takes 0 parameters. When you do Foo::stuff
you get a function with a receiver of type Foo
that takes no parameters. So this satisfies the requirement. However, when you do this::stuff
you have sort of partially applied the function, and what you get is actually a function that with no receiver that takes no parameters. This does not satisfy the requirement. Therefore this::stuff
isn't even a valid argument to subscribe