scala.tools.nsc.typechecker

# Implicits

#### trait Implicits extends AnyRef

This trait provides methods to find various kinds of implicits.

Self Type
  Analyzer
Version

  1.0

Linear Supertypes
AnyRef, Any
Known Subclasses
Analyzer, Duplicator, Duplicators, Erasure, SpecializationDuplicator, TreeCheckers, erasure, treeChecker
Type Hierarchy Learn more about scaladoc diagrams
Ordering

1. Alphabetic
2. By inheritance

Inherited

1. Implicits
2. AnyRef
3. Any

Implicitly

1. by any2stringadd
2. by any2stringfmt
3. by any2ArrowAssoc
4. by any2Ensuring

1. Hide All
2. Show all

Learn more about member selection
Visibility

1. Public
2. All

### Type Members

1. #### class ImplicitInfo extends AnyRef

   A class that records an available implicit

2. #### class ImplicitSearch extends Analyzer.Typer with Analyzer.ImplicitsContextErrors

   A class that sets up an implicit search.

3. #### case class OpenImplicit (info: Analyzer.ImplicitInfo, pt: Global.Type, tree: Global.Tree) extends Product with Serializable

   A class which is used to track pending implicits to prevent infinite implicit searches.

4. #### class SearchResult extends AnyRef

   The result of an implicit search

### Value Members

1. #### final def !=(arg0: AnyRef): Boolean

   Definition Classes
     AnyRef

2. #### final def !=(arg0: Any): Boolean

   Definition Classes
     Any

3. #### final def ##(): Int

   Definition Classes
     AnyRef → Any

4. #### def +(other: String): String

   Implicit information
     This member is added by an implicit conversion from Implicits to StringAdd performed by method any2stringadd in scala.Predef.
   Definition Classes
     StringAdd

5. #### def ->[B](y: B): (Implicits, B)

   Implicit information
     This member is added by an implicit conversion from Implicits to ArrowAssoc[Implicits] performed by method any2ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()

6. #### final def ==(arg0: AnyRef): Boolean

   Definition Classes
     AnyRef

7. #### final def ==(arg0: Any): Boolean

   Definition Classes
     Any

8. #### lazy val AmbiguousSearchFailure: Analyzer.SearchResult

9. #### lazy val DivergentSearchFailure: Analyzer.SearchResult

10. #### object Function1

    An extractor for unary function types arg => res

11. #### object HasMember

    An extractor for types of the form ? { name: ? }

12. #### object HasMethodMatching

    An extractor for types of the form ? { name: (? >: argtpe <: Any*)restp }

13. #### object ImplicitNotFoundMsg

14. #### val NoImplicitInfo: Analyzer.ImplicitInfo

    A sentinel indicating no implicit was found

15. #### lazy val SearchFailure: Analyzer.SearchResult

16. #### def allViewsFrom(tp: Global.Type, context: Analyzer.Context, tpars: List[Global.Symbol]): List[(Analyzer.SearchResult, List[Global.TypeConstraint])]

    Find all views from type `tp` (in which `tpars` are free)

    Find all views from type `tp` (in which `tpars` are free)

    Note that the trees in the search results in the returned list share the same type variables. Ignore their constr field! The list of type constraints returned along with each tree specifies the constraints that must be met by the corresponding type parameter in `tpars` (for the returned implicit view to be valid).

17. #### final def asInstanceOf[T0]: T0

    Definition Classes
      Any

18. #### def clone(): AnyRef

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

19. #### def ensuring(cond: (Implicits) ⇒ Boolean, msg: ⇒ Any): Implicits

    Implicit information
      This member is added by an implicit conversion from Implicits to Ensuring[Implicits] performed by method any2Ensuring in scala.Predef.
    Definition Classes
      Ensuring

20. #### def ensuring(cond: (Implicits) ⇒ Boolean): Implicits

    Implicit information
      This member is added by an implicit conversion from Implicits to Ensuring[Implicits] performed by method any2Ensuring in scala.Predef.
    Definition Classes
      Ensuring

21. #### def ensuring(cond: Boolean, msg: ⇒ Any): Implicits

    Implicit information
      This member is added by an implicit conversion from Implicits to Ensuring[Implicits] performed by method any2Ensuring in scala.Predef.
    Definition Classes
      Ensuring

22. #### def ensuring(cond: Boolean): Implicits

    Implicit information
      This member is added by an implicit conversion from Implicits to Ensuring[Implicits] performed by method any2Ensuring in scala.Predef.
    Definition Classes
      Ensuring

23. #### final def eq(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

24. #### def equals(arg0: Any): Boolean

    Definition Classes
      AnyRef → Any

25. #### def finalize(): Unit

    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )

26. #### def formatted(fmtstr: String): String

    Implicit information
      This member is added by an implicit conversion from Implicits to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
      StringFormat
    Annotations
      @inline()

27. #### final def getClass(): Class[_]

    Definition Classes
      AnyRef → Any

28. #### def hashCode(): Int

    Definition Classes
      AnyRef → Any

29. #### def inferImplicit(tree: Global.Tree, pt: Global.Type, isView: Boolean, context: Analyzer.Context, silent: Boolean, withMacrosDisabled: Boolean, pos: Global.Position, onError: (Global.Position, String) ⇒ Unit): Global.Tree

    A friendly wrapper over inferImplicit to be used in macro contexts and toolboxes.

30. #### def inferImplicit(tree: Global.Tree, pt: Global.Type, reportAmbiguous: Boolean, isView: Boolean, context: Analyzer.Context, saveAmbiguousDivergent: Boolean, pos: Global.Position): Analyzer.SearchResult

    Search for an implicit value.

    Search for an implicit value. See the comment on `result` at the end of class `ImplicitSearch` for more info how the search is conducted.

    tree

      The tree for which the implicit needs to be inserted. (the inference might instantiate some of the undetermined type parameters of that tree.

    pt

      The expected type of the implicit.

    reportAmbiguous

      Should ambiguous implicit errors be reported? False iff we search for a view to find out whether one type is coercible to another.

    isView

      We are looking for a view

    context

      The current context

    saveAmbiguousDivergent

      False if any divergent/ambiguous errors should be ignored after implicits search, true if they should be reported (used in further typechecking).

    pos

      Position that is should be used for tracing and error reporting (useful when we infer synthetic stuff and pass EmptyTree in the `tree` argument) If it's set NoPosition, then position-based services will use `tree.pos`

    returns

      A search result

31. #### def inferImplicit(tree: Global.Tree, pt: Global.Type, reportAmbiguous: Boolean, isView: Boolean, context: Analyzer.Context, saveAmbiguousDivergent: Boolean): Analyzer.SearchResult

32. #### def inferImplicit(tree: Global.Tree, pt: Global.Type, reportAmbiguous: Boolean, isView: Boolean, context: Analyzer.Context): Analyzer.SearchResult

33. #### final def isInstanceOf[T0]: Boolean

    Definition Classes
      Any

34. #### def memberWildcardType(name: Global.Name, tp: Global.Type): Global.Type

    A constructor for types ?{ def/type name: tp }, used in infer view to member searches.

35. #### final def ne(arg0: AnyRef): Boolean

    Definition Classes
      AnyRef

36. #### final def notify(): Unit

    Definition Classes
      AnyRef

37. #### final def notifyAll(): Unit

    Definition Classes
      AnyRef

38. #### def resetImplicits(): Unit

39. #### final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
      AnyRef

40. #### def toString(): String

    Definition Classes
      AnyRef → Any

41. #### final def wait(): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

42. #### final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

43. #### final def wait(arg0: Long): Unit

    Definition Classes
      AnyRef
    Annotations
      @throws( ... )

44. #### def →[B](y: B): (Implicits, B)

    Implicit information
      This member is added by an implicit conversion from Implicits to ArrowAssoc[Implicits] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
      ArrowAssoc

### Shadowed Implicit Value Members

1. #### val self: Any

   Implicit information
     This member is added by an implicit conversion from Implicits to StringAdd performed by method any2stringadd in scala.Predef.
   Shadowing
     This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
     To access this member you can use a type ascription:

         (implicits: StringAdd).self

   Definition Classes
     StringAdd

2. #### val self: Any

   Implicit information
     This member is added by an implicit conversion from Implicits to StringFormat performed by method any2stringfmt in scala.Predef.
   Shadowing
     This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
     To access this member you can use a type ascription:

         (implicits: StringFormat).self

   Definition Classes
     StringFormat

### Deprecated Value Members

1. #### def x: Implicits

   Implicit information
     This member is added by an implicit conversion from Implicits to ArrowAssoc[Implicits] performed by method any2ArrowAssoc in scala.Predef.
   Shadowing
     This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
     To access this member you can use a type ascription:

         (implicits: ArrowAssoc[Implicits]).x

   Definition Classes
     ArrowAssoc
   Annotations
     @deprecated
   Deprecated

     (Since version 2.10.0) Use `leftOfArrow`instead``

2. #### def x: Implicits

   Implicit information
     This member is added by an implicit conversion from Implicits to Ensuring[Implicits] performed by method any2Ensuring in scala.Predef.
   Shadowing
     This implicitly inherited member is ambiguous. One or more implicitly inherited members have similar signatures, so calling this member may produce an ambiguous implicit conversion compiler error.
     To access this member you can use a type ascription:

         (implicits: Ensuring[Implicits]).x

   Definition Classes
     Ensuring
   Annotations
     @deprecated
   Deprecated

     (Since version 2.10.0) Use `resultOfEnsuring`instead``

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd from Implicits to StringAdd

### Inherited by implicit conversion any2stringfmt from Implicits to StringFormat

### Inherited by implicit conversion any2ArrowAssoc from Implicits to ArrowAssoc[Implicits]

### Inherited by implicit conversion any2Ensuring from Implicits to Ensuring[Implicits]

### Ungrouped