title: scala compiler error on lazy val
body: <p>I came across the following error in scala compiler. I couldn't find the issue in jira. Therefore I decided to ask first if this is a known issue:</p>
  
  <p>I started with the following two methods:</p>
  
  <pre><code>  def getName: String = getString match {
      case None =&gt; return ""
      case Some(str) =&gt; return str
    }
  
    def getString: Option[String] = Some("abc")
  </code></pre>
  
  <p>Then I changed the first method to</p>
  
  <pre><code>  lazy val getName: String = getString match {
      case None =&gt; return ""
      case Some(str) =&gt; return str
    }
  </code></pre>
  
  <p>Unfortunately, I forgot to remove the return statement. In this case, scala compiler should stop with the message "return outside method definition", but what it really did was:</p>
  
  <pre><code>[ant:scalac] error: uncaught exception during compilation: java.lang.NullPointerException
  
  [ant:scalac] java.lang.NullPointerException
  [ant:scalac]    at scala.reflect.internal.Trees$class.Select(Trees.scala:1066)
  [ant:scalac]    at scala.reflect.internal.SymbolTable.Select(SymbolTable.scala:13)
  </code></pre>
  
  <p>It looks like a bug. Doesn't it?</p>