title: Kotlin: Code inside lamda function is unreachable while using library written in java
body: <p>I have used an image picker library (written in Java). It provides the pick-result to the caller activity using the overridden function. As my caller activity is in kotlin, the overridden function gets converted into lambda function. But the code inside lambda function doesn't get executed. Is this a Java-to-Kotlin issue? Or is there a mistake in code?</p>
  
  <p>Here is my code:</p>
  
  <pre><code>   UtilLib.getPhoto(this, ChooseType.REQUEST_ANY)
                  .enqueue({ path -&gt;
                      Picasso.with(applicationContext)
                              .load("file://$path")
                              .error(R.drawable.profile)
                              .resize(150, 150)
                              .into(ivProfilePic)
                  })
  </code></pre>
  
  <p>Library link: <a href="https://github.com/VinayRathod/UtilLib" rel="nofollow noreferrer">https://github.com/VinayRathod/UtilLib</a></p>
  
  <p><strong>Here is the Java Code also which will work perfectly(Java).</strong></p>
  
  <pre><code>            ChooseType chooseType =
                      ((RadioButton) findViewById(R.id.choose_gallery)).isChecked() ? ChooseType.REQUEST_PICK_PICTURE :
                              ((RadioButton) findViewById(R.id.choose_camera)).isChecked() ? ChooseType.REQUEST_CAPTURE_PICTURE :
                                      ChooseType.REQUEST_ANY;
              UtilLib.getPhoto(this, chooseType)
                      .enqueue(new OnImageChooserListener() {
  
                          @Override
                          public void onImageChoose(String path) {
                              ivPath.setText("" + path);
                              Glide.with(MainActivity.this).load(new File(path)).into(iv);
                          }
                      });
  </code></pre>