@@ -265,12 +265,12 @@ object Interactive {
265
265
namedTrees(trees, (include & Include .references) != 0 , matchSymbol(_, sym, include))
266
266
267
267
/** Find named trees with a non-empty position whose name contains `nameSubstring` in `trees`.
268
- *
269
- * @param includeReferences If true, include references and not just definitions
270
268
*/
271
- def namedTrees (trees : List [SourceTree ], includeReferences : Boolean , nameSubstring : String )
272
- (implicit ctx : Context ): List [SourceTree ] =
273
- namedTrees(trees, includeReferences, _.show.toString.contains(nameSubstring))
269
+ def namedTrees (trees : List [SourceTree ], nameSubstring : String )
270
+ (implicit ctx : Context ): List [SourceTree ] = {
271
+ val predicate : NameTree => Boolean = _.name.toString.contains(nameSubstring)
272
+ namedTrees(trees, includeReferences = false , predicate)
273
+ }
274
274
275
275
/** Find named trees with a non-empty position satisfying `treePredicate` in `trees`.
276
276
*
@@ -322,7 +322,7 @@ object Interactive {
322
322
val includeLinkedClass = (includes & Include .linkedClass) != 0
323
323
val predicate : NameTree => Boolean = tree =>
324
324
( tree.pos.isSourceDerived
325
- && ! tree.symbol.isConstructor
325
+ && ! tree.symbol.isPrimaryConstructor
326
326
&& (includeDeclaration || ! Interactive .isDefinition(tree))
327
327
&& ( Interactive .matchSymbol(tree, symbol, includes)
328
328
|| ( includeDeclaration
0 commit comments