title: Type inference on method return type
body: <p>Why does Scala fail to infer the return type of the method when there's an explicit <code>return</code> statement used in the method?</p>
  
  <p>For instance, why does the following code compile?</p>
  
  <pre><code>object Main {
      def who = 5
      def main(args: Array[String]) = println(who)
  }
  </code></pre>
  
  <p>But the following doesn't.</p>
  
  <pre><code>object Main {
      def who = return 5
      def main(args: Array[String]) = println(who)
  }
  </code></pre>