# Extension method search API

**URL:** <https://contributors.scala-lang.org/t/extension-method-search-api/5774>\
**Category:** Dotty\
**Created:** [June 22, 2022, 10:18am UTC](https://contributors.scala-lang.org/t/extension-method-search-api/5774 "2022-06-22T10:18:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![wangzaixiang](https://contributors.scala-lang.org/user_avatar/contributors.scala-lang.org/wangzaixiang/32/2469_2.png) [@wangzaixiang](https://contributors.scala-lang.org/u/wangzaixiang)\
**Post date:** [June 22, 2022, 10:18am UTC](https://contributors.scala-lang.org/t/extension-method-search-api/5774/1 "2022-06-22T10:18:24Z")

</div>

Scala 3 has an API for implicit lookup:

```scala
trait Quotes {
  
   trait refelectModle { 

       // quotes.reflect.Implicits
       trait ImplicitsModule { self: Implicits.type =>
          /** Find a given instance of type `T` in the current scope provided by the current enclosing splice.
          * Return an `ImplicitSearchResult`.
          *
          * @param tpe type of the implicit parameter
          */
          def search(tpe: TypeRepr): ImplicitSearchResult
        }
   }
}

```

My Problem is: Is there ay API for lookup extensions methods such as:

```scala
   // search for a matchable method for tpe.name[typeArgs](args) and return the method symbol.
   // include search for the tpe itself, or extension methods.
   def search(tpe: TypeRepr, name: String, typeArgs: List[TypeRepr],  
              args: List[List[TypeRepr]]): Option[Symbol]

```

eg:

```scala

search( TypeReprt.of[String], "toInt", Nil, Nil) == 
symbol( scala.collection.StringOps#toInt )

```
