Madrapps/eventbus-plugin

Subscribe to Post wont work for cases like `post(getMethod())`

Opened this issue · 0 comments

fun getMethod() : Type = Unit

bus.post(getMethod())

@Subscribe
fun subcribe(type: Type) {
}

In the above case, Post to Subscribe connection would work. But Subscribe to Post connection doesn't. We first need to find the usages of Type.. and from that find out the usages were Type is a return type of a Method. Then take those methods and find usages for those and then filter out all the cases where the method is used as a ValueArgument of post method. This will establish the connection.