From b92fa3e975c0bb3fe9446ab96a49ac1159f2c52b Mon Sep 17 00:00:00 2001 From: Matt Bovel Date: Tue, 19 Mar 2024 16:00:26 +0100 Subject: [PATCH] Use == when computing diff in Annotation.mapWith --- compiler/src/dotty/tools/dotc/core/Annotations.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/src/dotty/tools/dotc/core/Annotations.scala b/compiler/src/dotty/tools/dotc/core/Annotations.scala index 5429fec08b06..cea269acb3dc 100644 --- a/compiler/src/dotty/tools/dotc/core/Annotations.scala +++ b/compiler/src/dotty/tools/dotc/core/Annotations.scala @@ -62,7 +62,7 @@ object Annotations { if tm.isRange(x) then x else val tp1 = tm(tree.tpe) - foldOver(if tp1 eq tree.tpe then x else tp1, tree) + foldOver(if tp1 == tree.tpe then x else tp1, tree) val diff = findDiff(NoType, args) if tm.isRange(diff) then EmptyAnnotation else if diff.exists then derivedAnnotation(tm.mapOver(tree))