# Kotlin type inference compile error when using Akka java API

**URL:** <https://discuss.kotlinlang.org/t/kotlin-type-inference-compile-error-when-using-akka-java-api/1590>\
**Category:** Libraries\
**Created:** [April 10, 2016, 4:51am UTC](https://discuss.kotlinlang.org/t/kotlin-type-inference-compile-error-when-using-akka-java-api/1590 "2016-04-10T04:51:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![zarinfam.s](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/zarinfam.s/32/5171_2.png) [@zarinfam.s](https://discuss.kotlinlang.org/u/zarinfam.s)\
**Post date:** [April 10, 2016, 4:51am UTC](https://discuss.kotlinlang.org/t/kotlin-type-inference-compile-error-when-using-akka-java-api/1590/1 "2016-04-10T04:51:56Z")

</div>

I want to use Akka java API in a Kotlin program. When i want to set onComplete callback for a akka Future, i encounter the Kotlin compiler error, while the java equivalent work nice.

Please see [this question](http://stackoverflow.com/questions/36525910/kotlin-type-inference-compile-error-when-using-akka-java-api) in stackoverflow.

---

<div class="post-metadata">

**Author:** ![sergey.mashkov](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.kotlinlang.org/sergey.mashkov/32/1678_2.png) [@sergey.mashkov](https://discuss.kotlinlang.org/u/sergey.mashkov)\
**Post date:** [April 14, 2016, 4:52am UTC](https://discuss.kotlinlang.org/t/kotlin-type-inference-compile-error-when-using-akka-java-api/1590/2 "2016-04-14T04:52:23Z")

</div>

Closed on April 14, 2016, 4:52am UTC

This topic was automatically closed 4 days after the last reply. New replies are no longer allowed.
