Closed
Description
inline def check(v:Double): Unit = if(v==0) throw new Exception()
inline def divide(v: Double, d: Double): Double = { check(d); v / d }
def run = divide(10,2)
// Java decompiled method run
public double run() {
BoxedUnit var10000 = BoxedUnit.UNIT;
return 5.0D;
}
Expectation
The BoxedUnit type variable is very annoying when trying to optimize inlined code