title: Kotlin bound callable references inconsistency
body: <p>Today I was creating unit tests for my Presenter in Android app and I noticed some inconsistency with bound callable references. Is it under development or is it language bug? I found <a href="https://stackoverflow.com/a/33805243/4643073">that</a> in kotlin 1.1 bound callable references are supported. But my code fails with kotlin 1.1.2-4.</p>
  
  <p>In my presenter class, tested method reads data from database and <code>dao.getAllItems()</code> method have no parameters while view takes list --> <code>view.showData(List&lt;Item&gt;)</code>. </p>
  
  <p>I'm using Mockito, RxJava2 and Room Persistance library.</p>
  
  <pre><code>class ItemsPresenter @Inject constructor(private val itemDao: ItemDao) : Presenter&lt;ItemsView&gt;
  {
      val TAG = this.javaClass.name!!
      private val disposables: CompositeDisposable = CompositeDisposable()
      private lateinit var view: ItemsView
  
      override fun onCreate(view: ItemsView)
      {
          this.view = view
      }
  
      override fun onDestroy()
      {
          disposables.clear()
      }
  
      fun onGetItems()
      {
          Observable.fromCallable(itemDao::getAllItems)
                  .subscribeOn(Schedulers.io())
                  .observeOn(AndroidSchedulers.mainThread())
                  .subscribe(
                          { data -&gt; view.showData(data) },
                          { throwable -&gt; view.showLoadingDataError(throwable.localizedMessage) }
                  )
      }
  }
  </code></pre>
  
  <p>I have created test for <code>onGetItems()</code> method</p>
  
  <pre><code>@RunWith(KotlinTestRunner::class)
  class ItemsPresenterTest
  {
      private lateinit var view: ItemsView
      private lateinit var dao: ItemDao
      private lateinit var presenter: ItemsPresenter
  
      @Before
      fun setup()
      {
          RxAndroidPlugins.setInitMainThreadSchedulerHandler { Schedulers.io() }
          dao = mock(ItemDao::class.java)
          view = mock(ItemsView::class.java)
          presenter = ItemsPresenter(dao)
      }
  
      @Test
      fun onGetItemsTest()
      {
          val list = ArrayList&lt;Item&gt;()
          When(dao.getAllItems()).thenReturn(list)
          presenter.onCreate(view)
          presenter.onGetItems()
  
          verify(dao).getAllItems()
          verify(view).showData(list)
      }
  }
  </code></pre>
  
  <p>When I have setup as above, the test passes without problems. But when I change line<br>
  <code>{ data -&gt; view.showData(data) }</code> </p>
  
  <p>to </p>
  
  <p><code>{ view::showData }</code></p>
  
  <p>Then my test fails saying</p>
  
  <pre><code>Wanted but not invoked:
  itemsView.showData([]);
  </code></pre>
  
  <p>Is it language bug? Because vulnerable code compiles fine and runs, it just causes the method to not be invoked at all, without any errors. </p>
  
  <p>To clarify, the same code written in Java 8 works fine, lambda argument is correctly passed into method reference. As you can see in Kotlin bound callable references work fine when used with methods that takes no parameters, otherwise they are not called at all.</p>