ImportSuggestions

This trait defines the method importSuggestionAddendum that adds an addendum to error messages suggesting additional imports.

class Object
trait Matchable
class Any
class Typer
class ReTyper
class Typer
class Checker

Value members

Concrete methods

override def importSuggestionAddendum(pt: Type)(using Context): String

An addendum to an error message where the error might be fixed by some implicit value of type pt that is however not found. The addendum suggests given imports that might fix the problem. If there's nothing to suggest, an empty string is returned.

An addendum to an error message where the error might be fixed by some implicit value of type pt that is however not found. The addendum suggests given imports that might fix the problem. If there's nothing to suggest, an empty string is returned.

Definition Classes

Concrete fields

inline val MaxSuggestions: 10

The maximal number of suggested imports to make

The maximal number of suggested imports to make

Extensions

Extensions

extension (refs: List[TermRef])
def best(n: Int)(using Context): List[TermRef]

The best n references in refs, according to compare compare is a partial order. If there's a tie, we take elements in the order thy appear in the list.

The best n references in refs, according to compare compare is a partial order. If there's a tie, we take elements in the order thy appear in the list.

extension (refs: List[(TermRef, String)])

The ref parts of this list of pairs, discarding subsequent elements that have the same String part. Elements are sorted by their String parts.

The ref parts of this list of pairs, discarding subsequent elements that have the same String part. Elements are sorted by their String parts.