dotty.tools.dotc.reporting

Members list

Type members

Classlikes

class AbstractMemberMayNotHaveModifier(sym: Symbol, flag: FlagSet)(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class AbstractOverrideOnlyInTraits(sym: Symbol)(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

This class mixes in a few standard traits, so that it is easier to extend from Java.

This class mixes in a few standard traits, so that it is easier to extend from Java.

Attributes

Supertypes
class Reporter
trait ReporterResult
class Object
trait Matchable
class Any
Show all
Known subtypes
enum Action

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
class ActiveProfile(details: Int) extends Profile

Attributes

Supertypes
class Profile
class Object
trait Matchable
class Any
class AlreadyDefined(name: Name, owner: Symbol, conflicting: Symbol)(using x$4: Context) extends NamingMsg

Attributes

Supertypes
class NamingMsg
class Message
class Object
trait Matchable
class Any
Show all
class AmbiguousExtensionMethod(tree: Tree, expansion1: Tree, expansion2: Tree)(using x$4: Context) extends ReferenceMsg, NoDisambiguation

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
Show all
class AmbiguousOverload(tree: Tree, val alternatives: List[SingleDenotation], pt: Type, addendum: String)(implicit ctx: Context) extends ReferenceMsg, NoDisambiguation

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
Show all
class AmbiguousReference(name: Name, newPrec: BindingPrec, prevPrec: BindingPrec, prevCtx: Context)(using x$5: Context) extends ReferenceMsg, NoDisambiguation

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
Show all
class AnonymousFunctionMissingParamType(param: ValDef, tree: Function, inferredType: Type, expectedType: Type)(using x$5: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class AnonymousInstanceCannotBeEmpty(impl: Template)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class BadSymbolicReference(denot: SymDenotation)(using x$2: Context) extends ReferenceMsg

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
class ByNameParameterNotSupported(tpe: Tree)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class CannotBeAccessed(tpe: NamedType, superAccess: Boolean)(using x$3: Context) extends ReferenceMsg

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
class CannotExtendAnyVal(sym: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class CannotExtendContextFunction(sym: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class CannotExtendJavaEnum(sym: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class CannotHaveSameNameAs(sym: Symbol, cls: Symbol, reason: Reason)(using x$4: Context) extends NamingMsg

Attributes

Companion
object
Supertypes
class NamingMsg
class Message
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class CantInstantiateAbstractClassOrTrait(cls: Symbol, isTrait: Boolean)(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class CaseClassInInlinedCode(tree: Tree)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class CaseClassMissingParamList(cdef: TypeDef)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ClassAndCompanionNameClash(cls: Symbol, other: Symbol)(using x$3: Context) extends NamingMsg

Attributes

Supertypes
class NamingMsg
class Message
class Object
trait Matchable
class Any
Show all
class ClassCannotExtendEnum(cls: Symbol, parent: Symbol)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
case class CodeAction(title: String, description: Option[String], patches: List[ActionPatch])

A representation of a code action / fix that can be used by tooling to apply a fix to their code.

A representation of a code action / fix that can be used by tooling to apply a fix to their code.

Value parameters

description

An optional description of the fix.

patches

The patches that this fix contains.

title

The title of the fix, often showed to a user in their editor.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

This class implements a Reporter that displays messages on a text console

This class implements a Reporter that displays messages on a text console

Attributes

Companion
object
Supertypes
class Reporter
trait ReporterResult
class Object
trait Matchable
class Any
Show all

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class ConstrProxyShadows(proxy: TermRef, shadowed: Type, shadowedIsApply: Boolean)(using x$4: Context) extends ReferenceMsg, NoDisambiguation

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
Show all
class CyclicInheritance(symbol: Symbol, addendum: => String)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
abstract class CyclicMsg(errorId: ErrorMessageID)(using x$2: Context) extends Message
class CyclicReferenceInvolving(val ex: CyclicReference)(using x$2: Context) extends CyclicMsg

Attributes

Supertypes
class CyclicMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class CyclicMsg
class Message
class Object
trait Matchable
class Any
abstract class DeclarationMsg(errorId: ErrorMessageID)(using x$2: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Known subtypes
class DeprecatedWithOperator()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
object Diagnostic

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Diagnostic.type
class Diagnostic(val msg: Message, val pos: SourcePosition, val level: Int) extends Diagnostic

Attributes

Companion
object
Supertypes
trait Diagnostic
class Object
trait Matchable
class Any
Known subtypes
class Error
class StickyError
class Info
class Warning
Show all
object DidYouMean

A utility object to support "did you mean" hinting

A utility object to support "did you mean" hinting

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
DidYouMean.type
class DoesNotConformToBound(tpe: Type, which: String, bound: Type)(using x$4: Context) extends TypeMismatchMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Show all
class DoesNotConformToSelfType(category: String, selfType: Type, cls: Symbol, otherSelf: Type, relation: String, other: Symbol)(implicit ctx: Context) extends TypeMismatchMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Show all
class DoesNotConformToSelfTypeCantBeInstantiated(tp: Type, selfType: Type)(implicit ctx: Context) extends TypeMismatchMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Show all
class DoubleDefinition(decl: Symbol, previousDecl: Symbol, base: Symbol)(using x$4: Context) extends NamingMsg

Attributes

Supertypes
class NamingMsg
class Message
class Object
trait Matchable
class Any
Show all
class DuplicateBind(bind: Bind, tree: CaseDef)(using x$3: Context) extends NamingMsg

Attributes

Supertypes
class NamingMsg
class Message
class Object
trait Matchable
class Any
Show all
class DuplicateNamedTypeParameter(name: Name)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class EarlyDefinitionsNotSupported()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class EmptyCatchAndFinallyBlock(tryBody: Tree)(using x$2: Context) extends EmptyCatchOrFinallyBlock

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
Show all
class EmptyCatchBlock(tryBody: Tree)(using x$2: Context) extends EmptyCatchOrFinallyBlock

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
Show all
abstract class EmptyCatchOrFinallyBlock(tryBody: Tree, errNo: ErrorMessageID)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
Known subtypes
class EnumerationsShouldNotBeEmpty(cdef: TypeDef)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
enum ErrorMessageID(val isActive: Boolean) extends Enum[ErrorMessageID]

Unique IDs identifying the messages, this will be used to reference documentation online.

Unique IDs identifying the messages, this will be used to reference documentation online.

Value parameters

isActive

Whether or not the compile still emits this ErrorMessageID

Attributes

Companion
object
Supertypes
trait Enum
trait Product
trait Equals
trait Serializable
class Object
trait Matchable
class Any
Show all

Attributes

Companion
enum
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ExpectedTokenButFound(expected: Token, found: Token, prefix: String)(using x$4: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ExpectedTypeBoundOrEquals(found: Token)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

A re-usable Reporter used in Contexts#test

A re-usable Reporter used in Contexts#test

Attributes

Supertypes
class Reporter
trait ReporterResult
class Object
trait Matchable
class Any
Show all
class ExtendFinalClass(clazz: Symbol, finalClazz: Symbol)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ExtensionCanOnlyHaveDefs(mdef: Tree)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ExtensionMethodCannotHaveTypeParams(mdef: DefDef)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ExtensionNullifiedByMember(method: Symbol, target: Symbol)(using x$3: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class ExtractorNotFound(val name: Name)(using x$2: Context) extends NotFoundMsg

Attributes

Supertypes
class NotFoundMsg
class Message
class Object
trait Matchable
class Any
class FailureToEliminateExistential(tp: Type, tp1: Type, tp2: Type, boundSyms: List[Symbol], classRoot: Symbol)(using x$6: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class FinalLocalDef()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ForwardReferenceExtendsOverDefinition(value: Symbol, definition: Symbol)(using x$3: Context) extends ReferenceMsg

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any

This trait implements isHidden so that we avoid reporting non-sensical messages.

This trait implements isHidden so that we avoid reporting non-sensical messages.

Attributes

Supertypes
class Reporter
trait ReporterResult
class Object
trait Matchable
class Any
Known subtypes
class IdentifierExpected(identifier: String)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class IllegalCyclicTypeReference(val ex: CyclicReference, sym: Symbol, where: String, lastChecked: Type)(using x$5: Context) extends CyclicMsg

Attributes

Supertypes
class CyclicMsg
class Message
class Object
trait Matchable
class Any
class IllegalLiteral()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class IllegalParameterInit(found: Type, expected: Type, param: Symbol, cls: Symbol)(using x$5: Context) extends TypeMismatchMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Show all
class IllegalRedefinitionOfStandardKind(kindType: String, name: Name)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class IllegalStartOfSimplePattern()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class IllegalStartOfStatement(what: String, isModifier: Boolean, isStat: Boolean)(using x$4: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class IllegalStartSimpleExpr(illegalToken: String)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class IllegalSuperAccessor(base: Symbol, memberName: Name, targetName: Name, acc: Symbol, accTp: Type, other: Symbol, otherTp: Type)(using x$8: Context) extends DeclarationMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class IllegalVariableInPatternAlternative(name: Name)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ImplicitCaseClass(cdef: TypeDef)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ImplicitSearchTooLargeWarning(limit: Int, openSearchPairs: List[(Candidate, Type)])(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class ImportRenamedTwice(ident: Ident)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class InlineGivenShouldNotBeFunction()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class InlinedAnonClassWarning()(using x$1: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class InterpolatedStringError()(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class InvalidReferenceInImplicitNotFoundAnnotation(typeVar: String, owner: String)(using x$3: Context) extends ReferenceMsg

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
class JavaEnumParentArgs(parent: Type)(using x$2: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class JavaSymbolIsNotAValue(symbol: Symbol)(using x$2: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class LazyStaticField()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class LossyWideningConstantConversion(sourceType: Type, targetType: Type)(using x$3: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class MatchCaseOnlyNullWarning()(using x$1: Context) extends PatternMatchMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class MatchCaseUnreachable()(using x$1: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class MatchableWarning(tp: Type, pattern: Boolean)(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class MemberWithSameNameAsStatic()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
object Message

Tips for error message generation

  • You can use the em interpolator for error messages. It's defined in core.Decorators.
  • You can also use a simple string argument for error or warning (not for the other variants), but the string should not be interpolated or composed of objects that require a Context for evaluation.
  • When embedding interpolated substrings defined elsewhere in error messages, use i and make sure they are defined as def's instead of vals. That way, the possibly expensive interpolation will performed only in the case where the message is eventually printed. Note: At least during typer, it's common for messages to be discarded without being printed. Also, by making them defs, you ensure that they will be evaluated in the Message context, which makes formatting safer and more robust.
  • For common messages, or messages that might require explanation, prefer defining a new Message class in file messages.scala and use that instead. The advantage is that these messages have unique IDs that can be referenced elsewhere.

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Message.type
abstract class Message(val errorId: ErrorMessageID)(using x$2: Context)

A Message contains all semantic information necessary to easily comprehend what caused the message to be logged. Each message can be turned into a Diagnostic which contains the log level and can later be consumed by a subclass of Reporter. However, the error position is only part of Diagnostic, not Message.

A Message contains all semantic information necessary to easily comprehend what caused the message to be logged. Each message can be turned into a Diagnostic which contains the log level and can later be consumed by a subclass of Reporter. However, the error position is only part of Diagnostic, not Message.

NOTE: you should not persist a message directly, because most messages take an implicit Context and these contexts weigh in at about 4mb per instance. Therefore, persisting these will result in a memory leak.

Instead use the persist method to create an instance that does not keep a reference to these contexts.

Value parameters

errorId

a unique id identifying the message, this will be used to reference documentation online Messages modify the rendendering of interpolated strings in several ways:

  1. The size of the printed code is limited with a MessageLimiter. If the message would get too large or too deeply nested, a ... is printed instead.
  2. References to module classes are prefixed with object for better recognizability.
  3. A where clause is sometimes added which contains the following additional explanations:
    • References are disambiguated: If a message contains occurrences of the same identifier representing different symbols, the duplicates are printed with superscripts and the where-clause explains where each symbol is located.
    • Uninstantiated variables are explained in the where-clause with additional info about their bounds.
    • Skolems are explained with additional info about their underlying type. Messages inheriting from the NoDisambiguation trait or returned from the noDisambiguation() method skip point (3) above. This makes sense if the message already exolains where different occurrences of the same identifier are located. Examples are NamingMsgs such as double definition errors, overriding errors, and ambiguous implicit errors. We consciously made the design decision to disambiguate by default and disable disambiguation as an opt-in. The reason is that one usually does not consider all fine-grained details when writing an error message. If disambiguation is the default, some tests will show where clauses that look too noisy and that then can be disabled when needed. But if silence is the default, one usually does not realize that better info could be obtained by turning disambiguation on.

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class CyclicMsg
class NamingMsg
class NotFoundMsg
class MissingIdent
class NotAMember
class ReferenceMsg
class NotClassType
class NotConstant
class TypeMismatch
class SyntaxMsg
class TypeMsg
class NotAPath
class UnusedSymbol
Show all
Self type

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Message kinds that can be used in a Message. NOTE: Keep in mind that if you have a new message or a new ErrorMessageID that doesn't fit well into an existing kind, create a new one.

Message kinds that can be used in a Message. NOTE: Keep in mind that if you have a new message or a new ErrorMessageID that doesn't fit well into an existing kind, create a new one.

Attributes

Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
class MethodDoesNotTakeParameters(tree: Tree)(using x$2: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class MissingArgument(pname: Name, methString: String)(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class MissingArgumentList(method: String, sym: Symbol)(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class MissingCompanionForStatic(member: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class MissingEmptyArgumentList(method: String, tree: Tree)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class MissingIdent(tree: Ident, treeKind: String, val name: Name, proto: Type)(using x$5: Context) extends NotFoundMsg

Attributes

Supertypes
class NotFoundMsg
class Message
class Object
trait Matchable
class Any
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

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
Show all
class MissingReturnType()(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class MissingReturnTypeWithReturnStatement(method: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class MissingTypeParameterFor(tpe: Type)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class MissingTypeParameterInTypeApp(tpe: Type)(using x$2: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class MixedLeftAndRightAssociativeOps(op1: Name, op2: Name, op2LeftAssoc: Boolean)(using x$4: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ModifierNotAllowedForDefinition(flag: Flag)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
abstract class NamingMsg(errorId: ErrorMessageID)(using x$2: Context) extends Message, NoDisambiguation

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Known subtypes
class NativeMembersMayNotHaveImplementation(sym: Symbol)(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
trait NoDisambiguation extends Message

A marker trait that suppresses generation of where clause for disambiguations

A marker trait that suppresses generation of where clause for disambiguations

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Known subtypes
final class NoExplanation(msgFn: Context ?=> String)(using x$2: Context) extends Message

The fallback Message containing no explanation and having no kind

The fallback Message containing no explanation and having no kind

Attributes

Companion
object
Supertypes
class Message
class Object
trait Matchable
class Any
object NoExplanation

The extractor for NoExplanation can be used to check whether any error lacks an explanation

The extractor for NoExplanation can be used to check whether any error lacks an explanation

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class NoExtensionMethodAllowed(mdef: DefDef)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class NoMatchingOverload(val alternatives: List[SingleDenotation], pt: Type)(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
object NoProfile extends Profile

Attributes

Supertypes
class Profile
class Object
trait Matchable
class Any
Self type
NoProfile.type
class NoReturnFromInlineable(owner: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class NotAMember(site: Type, val name: Name, selected: String, proto: Type, addendum: => String)(using x$6: Context) extends NotFoundMsg, ShowMatchTrace

Attributes

Supertypes
class NotFoundMsg
class Message
class Object
trait Matchable
class Any
Show all
class NotAPath(tp: Type, usage: String)(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class NotAnExtractor(tree: Tree)(using x$2: Context) extends PatternMatchMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class NotClassType(tp: Type)(using x$2: Context) extends TypeMsg, ShowMatchTrace

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
Show all
class NotConstant(suffix: String, tp: Type)(using x$3: Context) extends TypeMsg, ShowMatchTrace

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
Show all
abstract class NotFoundMsg(errorId: ErrorMessageID)(using x$2: Context) extends Message

A simple not found message (either for idents, or member selection. Messages of this class are sometimes dropped in favor of other, more specific messages.

A simple not found message (either for idents, or member selection. Messages of this class are sometimes dropped in favor of other, more specific messages.

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Known subtypes
class ObjectMayNotHaveSelfType(mdef: ModuleDef)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class OnlyClassesCanBeAbstract(sym: Symbol)(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class OverloadInRefinement(rsym: Symbol)(using x$2: Context) extends DeclarationMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class CyclicMsg
class Message
class Object
trait Matchable
class Any
class OverrideError(core: Context ?=> String, base: Type, member: Symbol, other: Symbol, memberTp: Type, otherTp: Type)(using x$7: Context) extends DeclarationMsg, NoDisambiguation

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Show all
class OverridesNothing(member: Symbol)(using x$2: Context) extends DeclarationMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class OverridesNothingButNameExists(member: Symbol, existing: List[SingleDenotation])(using x$3: Context) extends DeclarationMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class PackageNameAlreadyDefined(pkg: Symbol)(using x$2: Context) extends NamingMsg

Attributes

Supertypes
class NamingMsg
class Message
class Object
trait Matchable
class Any
Show all
class ParamsNoInline(owner: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class PatternMatchExhaustivity(uncoveredCases: Seq[String], tree: Match)(using x$3: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
abstract class PatternMatchMsg(errorId: ErrorMessageID)(using x$2: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Known subtypes
class PkgDuplicateSymbol(existing: Symbol)(using x$2: Context) extends NamingMsg

Attributes

Supertypes
class NamingMsg
class Message
class Object
trait Matchable
class Any
Show all
class PolymorphicMethodMissingTypeInParent(rsym: Symbol, parentSym: Symbol)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
abstract class Profile

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object NoProfile
object Profile

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Profile.type
class ProperDefinitionNotFound()(using x$1: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class PureExpressionInStatementPosition(stat: Tree, val exprOwner: Symbol)(using x$3: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class PureUnitExpression(stat: Tree, tpe: Type)(using x$3: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class ReassignmentToVal(name: Name)(using x$2: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class RecursiveValueNeedsResultType(val ex: CyclicReference)(using x$2: Context) extends CyclicMsg

Attributes

Supertypes
class CyclicMsg
class Message
class Object
trait Matchable
class Any
class RedundantModifier(flag: Flag)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
abstract class ReferenceMsg(errorId: ErrorMessageID)(using x$2: Context) extends Message
class RepeatedModifier(modifier: String, source: SourceFile, span: Span)(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
object Reporter

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
Reporter.type
abstract class Reporter extends ReporterResult

This interface provides methods to issue information, warning and error messages.

This interface provides methods to issue information, warning and error messages.

Attributes

Companion
object
Supertypes
trait ReporterResult
class Object
trait Matchable
class Any
Known subtypes
class ReturnOutsideMethodDefinition(owner: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class SeqWildcardPatternPos()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
trait ShowMatchTrace(tps: Type*)(using x$2: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Known subtypes
class SkolemInInferred(tree: Tree, pt: Type, argument: Tree)(using x$4: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class StableIdentPattern(tree: Tree, pt: Type)(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class StaticFieldsOnlyAllowedInObjects(member: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class StaticFieldsShouldPrecedeNonStatic(member: Symbol, defns: List[Tree])(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class StaticOverridingNonStaticMembers()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class StoreReporter(outer: Reporter | Null, fromTyperState: Boolean) extends Reporter

This class implements a Reporter that stores all messages

This class implements a Reporter that stores all messages

Beware that this reporter can leak memory, and force messages in two scenarios:

  • During debugging config.Printers.typr is set from noPrinter to new Printer, which forces the message
  • The reporter is not flushed and the message containers capture a Context (about 4MB)

Attributes

Supertypes
class Reporter
trait ReporterResult
class Object
trait Matchable
class Any
Known subtypes
class SuperCallsNotAllowedInlineable(symbol: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class SuperQualMustBeParent(qual: Ident, cls: ClassSymbol)(using x$3: Context) extends ReferenceMsg

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
class Suppression(val annotPos: SourcePosition, filters: List[MessageFilter], val start: Int, end: Int, val verbose: Boolean)

Attributes

Supertypes
class Object
trait Matchable
class Any
class SymbolChangedSemanticsInVersion(symbol: Symbol, migrationVersion: ScalaVersion, migrationMessage: String)(using x$4: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class SymbolHasUnparsableVersionNumber(symbol: Symbol, errorMessage: String)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class SynchronizedCallOnBoxedClass(stat: Tree)(using x$2: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
abstract class SyntaxMsg(errorId: ErrorMessageID)(using x$2: Context) extends Message

The role of messages is to provide the necessary details for a simple to understand diagnostic event. Each message can be turned into a message container (one of the above) by calling the appropriate method on them. For instance:

Messages

The role of messages is to provide the necessary details for a simple to understand diagnostic event. Each message can be turned into a message container (one of the above) by calling the appropriate method on them. For instance:

EmptyCatchBlock(tree).error(pos)   // res: Error
EmptyCatchBlock(tree).warning(pos) // res: Warning

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Known subtypes
Show all
class TailrecNotApplicable(symbol: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class TargetNameOnTopLevelClass(symbol: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class CyclicMsg
class Message
class Object
trait Matchable
class Any

A re-usable Reporter used in Contexts#test

A re-usable Reporter used in Contexts#test

Attributes

Supertypes
class Reporter
trait ReporterResult
class Object
trait Matchable
class Any
Show all
class ThrowingReporter(reportInfo: Reporter) extends Reporter

This class implements a Reporter that throws all errors as UnhandledError exceptions and sends warnings and other info to the underlying reporter.

This class implements a Reporter that throws all errors as UnhandledError exceptions and sends warnings and other info to the underlying reporter.

Attributes

Supertypes
class Reporter
trait ReporterResult
class Object
trait Matchable
class Any
class TopLevelImplicitClass(cdef: TypeDef)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
trait TraceSyntax

This module is carefully optimized to give zero overhead if Config.tracingEnabled is false. The trace operation is called in various hotspots, so every tiny bit of overhead is unacceptable: boxing, closures, additional method calls are all out.

This module is carefully optimized to give zero overhead if Config.tracingEnabled is false. The trace operation is called in various hotspots, so every tiny bit of overhead is unacceptable: boxing, closures, additional method calls are all out.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object force
object log
object trace
class TraitCompanionWithMutableStatic()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class TraitIsExpected(symbol: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class TraitMayNotDefineNativeMethod(sym: Symbol)(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class TraitRedefinedFinalMethodFromAnyRef(method: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class TraitsMayNotBeFinal(sym: Symbol)(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class TypeDoesNotTakeParameters(tpe: Type, params: List[Tree])(using x$3: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class TypeMismatch(val found: Type, expected: Type, val inTree: Option[Tree], addenda: => String*)(using x$5: Context) extends TypeMismatchMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Show all
abstract class TypeMismatchMsg(found: Type, expected: Type)(errorId: ErrorMessageID)(using x$4: Context) extends Message, ShowMatchTrace

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
Known subtypes
class TypeTestAlwaysDiverges(scrutTp: Type, testTp: Type)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class TypedCaseDoesNotExplicitlyExtendTypedEnum(enumDef: Symbol, caseDef: TypeDef)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class TypesAndTraitsCantBeImplicit()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class UnableToEmitSwitch()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class UnableToExtendSealedClass(pclazz: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class UnapplyInvalidNumberOfArguments(qual: Tree, argTypes: List[Type])(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class UnapplyInvalidReturnType(unapplyResult: Type, unapplyName: Name)(using x$3: Context) extends DeclarationMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class UnboundPlaceholderParameter()(implicit ctx: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class UnboundWildcardType()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class UncheckedTypePattern(argType: Type, whyNot: String)(using x$3: Context) extends PatternMatchMsg

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class UndefinedNamedTypeParameter(undefinedName: Name, definedNames: List[Name])(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class UnexpectedPatternForSummonFrom(tree: Tree[_])(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class UnhandledError(val diagnostic: Error) extends Exception

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all

This trait implements isHidden so that multiple messages per position are suppressed, unless they are of increasing severity.

This trait implements isHidden so that multiple messages per position are suppressed, unless they are of increasing severity.

Attributes

Supertypes
class Reporter
trait ReporterResult
class Object
trait Matchable
class Any
Known subtypes

Attributes

Supertypes
class ReferenceMsg
class Message
class Object
trait Matchable
class Any
class UnqualifiedCallToAnyRefMethod(stat: Tree, method: Symbol)(using x$3: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class UnreducibleApplication(tycon: Type)(using x$2: Context) extends TypeMsg

Attributes

Supertypes
class TypeMsg
class Message
class Object
trait Matchable
class Any
class UnusedNonUnitValue(tp: Type)(using x$2: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class UnusedSymbol(errorText: String)(using x$2: Context) extends Message

Attributes

Companion
object
Supertypes
class Message
class Object
trait Matchable
class Any
object UnusedSymbol

Attributes

Companion
class
Supertypes
class Object
trait Matchable
class Any
Self type
class ValueClassNeedsOneValParam(valueClass: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassParameterMayNotBeAVar(valueClass: Symbol, param: Symbol)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassParameterMayNotBeCallByName(valueClass: Symbol, param: Symbol)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassesMayNotBeAbstract(valueClass: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassesMayNotBeContainted(valueClass: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassesMayNotContainInitalization(valueClass: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassesMayNotDefineASecondaryConstructor(valueClass: Symbol, constructor: Symbol)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassesMayNotDefineInner(valueClass: Symbol, inner: Symbol)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassesMayNotDefineNonParameterField(valueClass: Symbol, field: Symbol)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueClassesMayNotWrapAnotherValueClass(valueClass: Symbol)(using x$2: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class ValueDiscarding(tp: Type)(using x$2: Context) extends Message

Attributes

Supertypes
class Message
class Object
trait Matchable
class Any
class VarArgsParamMustComeLast()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class VarValParametersMayNotBeCallByName(name: TermName, mutable: Boolean)(using x$3: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class VolatileOnVal()(using x$1: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
final case class WConf(confs: List[(List[MessageFilter], Action)])

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object WConf

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
WConf.type

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class WrongNumberOfParameters(tree: Tree, foundCount: Int, pt: Type, expectedCount: Int)(using x$5: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
class WrongNumberOfTypeArgs(fntpe: Type, expectedArgs: List[ParamInfo], actual: List[Tree])(using x$4: Context) extends SyntaxMsg

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any

Attributes

Supertypes
class SyntaxMsg
class Message
class Object
trait Matchable
class Any
object trace extends TraceSyntax

Exposes the

Exposes the

 trace("question") { op } 

syntax.

Traced operations will print indented messages if enabled. Tracing depends on Config.tracingEnabled and dotty.tools.dotc.config.ScalaSettings.Ylog. Tracing can be forced by replacing trace with trace.force or trace.log (see below).

Attributes

Supertypes
trait TraceSyntax
class Object
trait Matchable
class Any
Self type
trace.type