Hacker News new | ask | show | jobs
by azth 4105 days ago

    scala> def f(x: Int) = if (x % 2 == 0) { x } else { None }
    f: (x: Int)Any
Which is expected. The only shared type between both branches of the `if` expression is `Any`.