title: Scala return List() from function instead of Future[custom object]
body: <p>I have below code which method returns Future[Account] where Account is the case class object. Below is the code </p>
  
  <pre><code>import scala.concurrent.Future
  import scala.concurrent.ExecutionContext.Implicits.global
  case class Account (acctId:String, userId:String)
  object NewTest extends App{
  
  val account = getAcct
  println ("account Fut is " +account)
  
  def getAcct(): Future[Account] = {
  
   val accountFutOpt = Future {
     //Some(Account("1234","5678"))
     None
   }
  
  (for {
    accountOpt &lt;- accountFutOpt
    account = accountOpt
    if account.isDefined
   }yield account.get).recoverWith {
     case _: NoSuchElementException =&gt;
      //println(s"No Account associated to acctId ")
      Future.failed(new IllegalStateException(s"No account associated to acctId  "))
    }
   }
  } 
  </code></pre>
  
  <p>When the accountFutOpt is Some(account) the result is Success(Account) as expected. But when the accountFutOpt is None, the output of the method is List as below.</p>
  
  <pre><code>account Fut is List()
  </code></pre>
  
  <p>List() instead of Future should throw compilation error correct?</p>