Fixed compilation for 'assignment in an expression context'

We prohibit things like
  val a = while(b) { ... }
  val b: Unit = c = 1
when statement appears in an expression context.

For function not block body it has worked so far (it was a bug actually).
This commit fixes a compilation.