We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c437512 commit 4ca7d8dCopy full SHA for 4ca7d8d
compiler/src/dotty/tools/dotc/transform/Erasure.scala
@@ -477,7 +477,7 @@ object Erasure {
477
*/
478
override def typedApply(tree: untpd.Apply, pt: Type)(implicit ctx: Context): Tree = {
479
val Apply(fun, args) = tree
480
- if (fun.symbol == defn.cbnArg || (tree.symbol.name == nme.box || tree.symbol.name == nme.unbox) && tree.symbol.owner.asClass.companionClass == defn.UnitClass)
+ if (fun.symbol == defn.cbnArg || fun.symbol == boxMethod(defn.UnitClass) || fun.symbol == unboxMethod(defn.UnitClass))
481
typedUnadapted(args.head, pt)
482
else typedExpr(fun, FunProto(args, pt, this)) match {
483
case fun1: Apply => // arguments passed in prototype were already passed
0 commit comments