title: Kotlin: Overload resolution ambiguity
body: <p><a href="https://i.stack.imgur.com/DfBoW.png" rel="noreferrer"><img src="https://i.stack.imgur.com/DfBoW.png" alt="Screenshot of the error"></a>Trying to execute the below code :</p>
  
  <pre><code>class MainActivity : AppCompatActivity() {
  
      override fun onCreate(savedInstanceState: Bundle?) {
          super.onCreate(savedInstanceState)
          setContentView(R.layout.activity_main)
  
          Test().list.contains(1)
      }
  }
  
  public class Test {
  
      ArrayList&lt;Integer&gt; list;
  
      public ArrayList&lt;Integer&gt; getList() {
          return list;
      }
  }
  </code></pre>
  
  <p>and compilation fails at <code>Test().list.contains(1)</code> with message :</p>
  
  <blockquote>
    <p>Task :app:compileDebugKotlin FAILED
    e: /Users/sreejithcr/Documents/MyApplication/app/src/main/java/com/wxample/myapplication/MainActivity.kt: (13, 31): Overload resolution ambiguity: 
    public open fun contains(@Nullable element: Int!): Boolean defined in java.util.ArrayList
    public open fun contains(@Nullable element: Int!): Boolean defined in java.util.ArrayList</p>
  </blockquote>
  
  <p>What i understand is compiler finds 2 contains() with exact same signature and not sure which one to call.</p>
  
  <p>gradle config :</p>
  
  <p>ext.kotlin_version = '1.3.41'</p>
  
  <p>classpath 'com.android.tools.build:gradle:3.4.2'</p>