Skip to content

Commit 7a259ca

Browse files
committed
VCElideAllocations: Use convenience method tpd#equal
1 parent eacb5af commit 7a259ca

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler/src/dotty/tools/dotc/transform/VCElideAllocations.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ class VCElideAllocations extends MiniPhase with IdentityDenotTransformer {
2929
case BinaryOp(NewWithArgs(tp1, List(u1)), op, NewWithArgs(tp2, List(u2)))
3030
if (tp1 eq tp2) && (op eq defn.Any_==) && isDerivedValueClass(tp1.typeSymbol) =>
3131
// == is overloaded in primitive classes
32-
applyOverloaded(u1, nme.EQ, List(u2), Nil, defn.BooleanType)
32+
u1.equal(u2)
3333

3434
// (new V(u)).underlying() => u
3535
case ValueClassUnbox(NewWithArgs(_, List(u))) =>

0 commit comments

Comments
 (0)