Hello. At a glance this looks like https://youtrack.jetbrains.com/issue/KT-15263, which should be fixed in the experimental new inference: New Type Inference in Kotlin 1.3.0-rc-190. Please try it with the latest version of Kotlin. If it doesn’t work for your code example, please submit a new issue at http://kotl.in/issue, maybe we could support this case in the future.