File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ object Scopes {
106106 }
107107
108108 /** Tests whether a predicate holds for at least one Symbol of this Scope. */
109- def exists (p : Symbol => Boolean )(implicit ctx : Context ): Boolean = filter(p).isEmpty
109+ def exists (p : Symbol => Boolean )(implicit ctx : Context ): Boolean = filter(p).nonEmpty
110110
111111 /** Finds the first Symbol of this Scope satisfying a predicate, if any. */
112112 def find (p : Symbol => Boolean )(implicit ctx : Context ): Symbol = filter(p) match {
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ class YCheckPositions extends Phases.Phase {
5858
5959 private def isMacro (call : Tree )(implicit ctx : Context ) = {
6060 if (ctx.phase <= ctx.typerPhase.next) call.symbol.is(Macro )
61- else (call.symbol.unforcedDecls.exists(_.is(Macro )) || call.symbol.unforcedDecls.toList.exists(_.is(Macro )))
61+ else (call.symbol.unforcedDecls.isEmpty /* bug from exists */ || call.symbol.unforcedDecls. exists(_.is(Macro )) || call.symbol.unforcedDecls.toList.exists(_.is(Macro )))
6262 }
6363
6464}
You can’t perform that action at this time.
0 commit comments