Implicits

dotty.tools.dotc.typer.Implicits
See theImplicits companion object
trait Implicits

The implicit resolution part of type checking

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Typer
class ReTyper
class Typer
class Checker
Self type

Members list

Concise view

Type members

Classlikes

class ImplicitSearch(val pt: Type, val argument: Tree, span: Span)(using x$4: Context)

An implicit search; parameters as in inferImplicit

An implicit search; parameters as in inferImplicit

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def assumedCanEqual(ltp: Type, rtp: Type)(using Context): Boolean

A CanEqual[T, U] instance is assumed

A CanEqual[T, U] instance is assumed

  • if one of T, U is an error type, or
  • if one of T, U is a subtype of the lifted version of the other, unless strict equality is set.

Attributes

def checkCanEqual(ltp: Type, rtp: Type, span: Span)(using Context): Unit

Check that equality tests between types ltp and rtp make sense

Check that equality tests between types ltp and rtp make sense

Attributes

def implicitArgTree(formal: Type, span: Span)(using Context): Tree

Search an implicit argument and report error if not found

Search an implicit argument and report error if not found

Attributes

def implicitParamString(paramName: TermName, methodStr: String, tree: Tree)(using Context): String

A string indicating the formal parameter corresponding to a missing argument

A string indicating the formal parameter corresponding to a missing argument

Attributes

def inferImplicit(pt: Type, argument: Tree, span: Span)(using Context): SearchResult

Find an implicit parameter or conversion.

Find an implicit parameter or conversion.

Attributes

argument

If an implicit conversion is searched, the argument to which it should be applied, EmptyTree otherwise.

pt

The expected type of the parameter or conversion.

span

The position where errors should be reported.

def inferImplicitArg(formal: Type, span: Span)(using Context): Tree

Find an implicit argument for parameter formal. Return a failure as a SearchFailureType in the type of the returned tree.

Find an implicit argument for parameter formal. Return a failure as a SearchFailureType in the type of the returned tree.

Attributes

def inferView(from: Tree, to: Type)(using Context): SearchResult

Find an implicit conversion to apply to given tree from so that the result is compatible with type to.

Find an implicit conversion to apply to given tree from so that the result is compatible with type to.

Attributes

def missingArgMsg(arg: Tree, pt: Type, where: String, paramSymWithMethodCallTree: Option[(Symbol, Tree)])(using Context): Message

Attributes

arg

Tree representing a failed result of implicit search

paramSymWithMethodCallTree

Symbol of the parameter for which the implicit was searched and tree of the method call that triggered the implicit search

pt

Type for which an implicit value was searched

where

Description of where the search was performed. Might be empty

def typedImplicit(cand: Candidate, pt: Type, argument: Tree, span: Span)(using Context): SearchResult

Try to typecheck an implicit reference

Try to typecheck an implicit reference

Attributes

override def viewExists(from: Type, to: Type)(using Context): Boolean

Attributes

Definition Classes