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 {
106
106
}
107
107
108
108
/** 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
110
110
111
111
/** Finds the first Symbol of this Scope satisfying a predicate, if any. */
112
112
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 {
58
58
59
59
private def isMacro (call : Tree )(implicit ctx : Context ) = {
60
60
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 )))
62
62
}
63
63
64
64
}
You can’t perform that action at this time.
0 commit comments