scala/scala — pull request #2255 by retronym (2013-03-13 22:36:12+00:00)
Title: SI-7249 Reign in overzealous Function0 optimization.

The fix for SI-1247 went too far, and could result in
premature evaluation of the expression that yields the
Function0.

This commit checks that said expression is safe to inline.
If not, a wrapper `() => ....` is still required.

The optimization is still enabled in sitations like the
original test case, run/t1247.scala.

Review by @JamesIry