MissingImplicitArgument

dotty.tools.dotc.reporting.MissingImplicitArgument
class MissingImplicitArgument(arg: Tree, pt: Type, where: String, paramSymWithMethodCallTree: Option[(Symbol, Tree)], ignoredInstanceNormalImport: => Option[SearchSuccess], ignoredConvertibleImplicits: => Iterable[TermRef])(using x$7: Context) extends TypeMsg, ShowMatchTrace

Attributes

Graph
Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
Show all

Members list

Type members

Classlikes

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type

Value members

Concrete methods

def explain(using Context): String

The explanation should provide a detailed description of why the error occurred and use examples from the user's own code to illustrate how to avoid these errors. It might contain embedded tags.

The explanation should provide a detailed description of why the error occurred and use examples from the user's own code to illustrate how to avoid these errors. It might contain embedded tags.

Attributes

def formatAnnotationMessage(rawMsg: String, sym: Symbol, substituteType: Type => Type)(using Context): String

Value parameters

rawMsg

Message template with variables, e.g. "Variable A is ${A}"

substituteType

Function substituting specific types for abstract types associated with variables, e.g A -> Int

sym

Symbol of the annotated type or of the method whose parameter was annotated

Attributes

def msg(using Context): String

The msg contains the diagnostic message e.g:

The msg contains the diagnostic message e.g:

expected: String found: Int

This message will be placed underneath the position given by the enclosing Diagnostic. The message is given in raw form, with possible embedded tags.

Attributes

override def msgPostscript(using Context): String

What gets printed after the message proper

What gets printed after the message proper

Attributes

Definition Classes
def userDefinedErrorString(raw: String, paramNames: List[String], args: List[Type])(using Context): String

Format raw implicitNotFound or implicitAmbiguous argument, replacing all occurrences of ${X} where X is in paramNames with the corresponding shown type in args.

Format raw implicitNotFound or implicitAmbiguous argument, replacing all occurrences of ${X} where X is in paramNames with the corresponding shown type in args.

Attributes

The implicitNotFound annotation on the parameter, or else on the type. implicitNotFound message strings starting with explain= are intended for additional explanations, not the message proper. The leading explain= is dropped in this case.

The implicitNotFound annotation on the parameter, or else on the type. implicitNotFound message strings starting with explain= are intended for additional explanations, not the message proper. The leading explain= is dropped in this case.

Value parameters

explain

The message is used for an additional explanation, not the message proper.

Attributes

Extracting the message from a method parameter, e.g. in

Extracting the message from a method parameter, e.g. in

trait Foo

def foo(implicit @annotation.implicitNotFound("Foo is missing") foo: Foo): Any = ???

Attributes

def userDefinedMsg(sym: Symbol, cls: Symbol)(using Context): Option[String]

Extract a user defined error message from a symbol sym with an annotation matching the given class symbol cls.

Extract a user defined error message from a symbol sym with an annotation matching the given class symbol cls.

Attributes

Inherited methods

A list of actions attached to this message to address the issue this message represents.

A list of actions attached to this message to address the issue this message represents.

Attributes

Inherited from:
Message
def append(suffix: => String): Message

Attributes

Inherited from:
Message
def appendExplanation(suffix: => String): Message

Attributes

Inherited from:
Message

Does this message have an explanation? This is normally the same as explain.nonEmpty but can be overridden if we need a way to return true without actually calling the explain method.

Does this message have an explanation? This is normally the same as explain.nonEmpty but can be overridden if we need a way to return true without actually calling the explain method.

Attributes

Inherited from:
Message

A message is non-sensical if it contains references to internally generated error types. Normally we want to suppress error messages referring to types like this because they look weird and are normally follow-up errors to something that was diagnosed before.

A message is non-sensical if it contains references to internally generated error types. Normally we want to suppress error messages referring to types like this because they look weird and are normally follow-up errors to something that was diagnosed before.

Attributes

Inherited from:
Message

The kind of the error message, e.g. "Syntax" or "Type Mismatch". This will be printed as "$kind Error", "$kind Warning", etc, on the first line of the message.

The kind of the error message, e.g. "Syntax" or "Type Mismatch". This will be printed as "$kind Error", "$kind Warning", etc, on the first line of the message.

Attributes

Inherited from:
TypeMsg
def mapMsg(f: String => String): Message

Attributes

Inherited from:
Message

The implicit Context in messages is a large thing that we don't want persisted. This method gets around that by duplicating the message, forcing its msg and explanation vals and dropping the implicit context that was captured in the original message.

The implicit Context in messages is a large thing that we don't want persisted. This method gets around that by duplicating the message, forcing its msg and explanation vals and dropping the implicit context that was captured in the original message.

Attributes

Inherited from:
Message
def prepend(prefix: => String): Message

Attributes

Inherited from:
Message

Override with true for messages that should always be shown even if their position overlaps another messsage of a different class. On the other hand multiple messages of the same class with overlapping positions will lead to only a single message of that class to be issued.

Override with true for messages that should always be shown even if their position overlaps another messsage of a different class. On the other hand multiple messages of the same class with overlapping positions will lead to only a single message of that class to be issued.

Attributes

Inherited from:
Message
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Message -> Any
Inherited from:
Message
def withoutDisambiguation(): Message.this.type

Attributes

Inherited from:
Message

Inherited fields

Attributes

Inherited from:
Message
lazy val explanation: String

The explanation to report. tags are filtered out

The explanation to report. tags are filtered out

Attributes

Inherited from:
Message
lazy val message: String

The message to report. tags are filtered out

The message to report. tags are filtered out

Attributes

Inherited from:
Message