title: Scala 2.12 and Java 8 SAM interop doesn't compile
body: <p>I'm trying to test a Java 8 class using <code>rx.Observable</code> from Scala Test. As per Scala <code>2.12.0-M3</code> <a href="http://www.scala-lang.org/news/2.12.0-M3/" rel="nofollow">release notes</a>:</p>
  
  <blockquote>
    <p>LAMBDA SYNTAX FOR SAM TYPES (EXPERIMENTAL) As of M3, this feature is
    not yet on by default. You can enable it with the <code>-Xexperimental</code>
    compiler option.</p>
    
    <p>When the option is enabled, then similar to Java 8, Scala 2.12 allows
    instantiating any type with one single abstract method by passing a
    lambda.</p>
  </blockquote>
  
  <p>However, using Gradle and IntelliJ, I can't get the following to compile:</p>
  
  <pre><code>val o: rx.Observable[util.Map.Entry[String, _ &lt;: util.Collection[String]]] = ???
  val scheduler = new TestScheduler()
  scheduler.createWorker().schedule(_ =&gt; o.foreach { }) // The argument is an Action0, which has a SAM void call()
  </code></pre>
  
  <p><strong>build.gradle</strong>:</p>
  
  <pre><code>apply plugin: 'scala'
  
  group = 'name.abhijitsarkar.scala'
  version = '1.0-SNAPSHOT'
  
  tasks.withType(ScalaCompile) {
      scalaCompileOptions.useAnt = false
      scalaCompileOptions.additionalParameters = ["-feature", "-Xexperimental"]
      targetCompatibility = "1.8"
  }
  
  dependencies {
      compile 'org.scala-lang:scala-library:2.12.0-M3'
      compile 'com.typesafe.akka:akka-stream-experimental_2.11:2.0.3'
      compile 'io.reactivex:rxjava:1.1.0'
      testCompile 'org.scalatest:scalatest_2.12.0-M3:3.0.0-M12'
  }
  </code></pre>