File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -117,13 +117,18 @@ object Annotations {
117117 def isLambdaParam (t : Type ) = t match
118118 case TermParamRef (tl1, _) => tl eq tl1
119119 case _ => false
120- tpd.allArguments(tree).exists: arg =>
121- if arg.isType then
122- arg.tpe.existsPart(isLambdaParam, stopAt = StopAt .Static )
123- else
124- arg.existsSubTree:
120+
121+ val acc = new TreeAccumulator [Boolean ]:
122+ def apply (x : Boolean , t : Tree )(using Context ) =
123+ if x then true
124+ else if t.isType then
125+ t.tpe.existsPart(isLambdaParam, stopAt = StopAt .Static )
126+ else t match
125127 case id : (Ident | This ) => isLambdaParam(id.tpe.stripped)
126- case _ => false
128+ case _ => foldOver(x, t)
129+
130+ tpd.allArguments(tree).exists(acc(false , _))
131+ end refersToParamOf
127132
128133 /** A string representation of the annotation. Overridden in BodyAnnotation.
129134 */
You can’t perform that action at this time.
0 commit comments