title: No type arguments expected for class Matcher
body: <p>I am trying to create a custom matcher for an espresso test. My code so far is:</p>
  <pre><code>private fun withCrossedOutText(): Matcher&lt;View&gt; {
      return object :  BoundedMatcher&lt;View, TextView&gt;(TextView::class.java) {
          override fun matchesSafely(item: TextView?): Boolean {
              // Code
          }
  
          override fun describeTo(description: org.hamcrest.Description?) {
              // Code
          }
      }
  }
  </code></pre>
  <p>This gives an error on the first line saying</p>
  <blockquote>
  <p>No type arguments expected for class Matcher</p>
  </blockquote>
  <p>I have tried removing <code>&lt;View&gt;</code> but this creates more issues.</p>