def id[T](t: T) = t
{ if (x) id(one) else 0} + 1
{ if (x) new scala.util.Random()}.asInstanceOf[Runnable]
After erasure both those if's have different types of branches:
{ if (x) id(box(one)) else 0} + 1
{ if (x) new scala.util.Random() else ()}.asInstanceOf[Runnable]
In first example id should get unboxed,
In the second example () should get boxed.