Closed
Description
Minimized example
Compile the following with -Xprint:elimErasedValueType
class ApproxState(private val bits: Int) extends AnyVal
object Main {
val FreshApprox: ApproxState = new ApproxState(4)
var approx: ApproxState = FreshApprox
println(approx == FreshApprox)
}
Output
The last statement compiles to:
println(
scala.Boolean.box(
new ApproxState(Main.approx()).==(new ApproxState(Main.FreshApprox()))
)
)
Expectation
No boxing
Metadata
Metadata
Assignees
Labels
No labels