Any idea why we need to specify explicitly the `Ha...
# announcements
s
Any idea why we need to specify explicitly the `HandlerFunction`type in the Kotlin version https://github.com/sdeleuze/projectreactor.io/blob/kotlin/src/main/kotlin/io/projectreactor/Application.kt#L32-L42 while it works without it in Java https://github.com/sdeleuze/projectreactor.io/blob/spring-based-website/src/main/java/io/projectreactor/Application.java#L32-L50 The method used is https://github.com/spring-projects/spring-framework/blob/master/spring-web-reactive/src/main/java/org/springframework/web/reactive/function/RouterFunctions.java#L74 (the project can be cloned if somebody want to check in an IDE). It is using the new functional web framework we are currently working on for Spring Framework 5 (see https://spring.io/blog/2016/09/22/new-in-spring-5-functional-web-framework for more details) but no dependency injection is used here, just a plain
main()
method, and my question is not specific to Spring. I would like to understand why Kotlin type inference does not work while the Java one works to understand if: 1) There is something to fix in this sample project 2) We can do something in the framework to be more Kotlin friendly without impacting the Java use case 3) There is something to improve in Kotlin type inference to support this use case Thanks for your feedback