Mode

dotty.tools.dotc.core.Mode
See theMode companion class
object Mode

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Mode.type

Members list

Value members

Concrete methods

def newMode(bit: Int, name: String): Mode

Concrete fields

Allow hk applications of type lambdas to wildcard arguments; used for checking that such applications do not normally arise

Allow hk applications of type lambdas to wildcard arguments; used for checking that such applications do not normally arise

Attributes

Signifies one of two possible situations:

Signifies one of two possible situations:

  1. We are currently checking bounds to be non-empty, so we should not do any widening when computing members of refined types.
  2. We are currently checking self type conformance, so we should not ignore capture sets added to otherwise pure classes (only needed for capture checking).

Attributes

Are we looking for cyclic references?

Are we looking for cyclic references?

Attributes

Are we trying to find a hidden implicit?

Are we trying to find a hidden implicit?

Attributes

We are typing the body of the condition of an inline if or the scrutinee of an inline match This mode forces expansion of inline calls in those positions even during typing.

We are typing the body of the condition of an inline if or the scrutinee of an inline match This mode forces expansion of inline calls in those positions even during typing.

Attributes

Make subtyping checks instead infer constraints necessarily following from given subtyping relation.

Make subtyping checks instead infer constraints necessarily following from given subtyping relation.

This enables changing GadtConstraint and alters how TypeComparer approximates constraints.

Attributes

Treat CapturingTypes as plain AnnotatedTypes even in phase CheckCaptures. Reuses the value of OldOverloadingResolution to save Mode bits. This is OK since OldOverloadingResolution only affects implicit search, which is done during phases Typer and Inlinig, and IgnoreCaptures only has an effect during phase CheckCaptures.

Treat CapturingTypes as plain AnnotatedTypes even in phase CheckCaptures. Reuses the value of OldOverloadingResolution to save Mode bits. This is OK since OldOverloadingResolution only affects implicit search, which is done during phases Typer and Inlinig, and IgnoreCaptures only has an effect during phase CheckCaptures.

Attributes

We are currently in a viewExists check. In that case, ambiguous implicits checks are disabled and we succeed with the first implicit found.

We are currently in a viewExists check. In that case, ambiguous implicits checks are disabled and we succeed with the first implicit found.

Attributes

Are we typechecking the rhs of an extension method?

Are we typechecking the rhs of an extension method?

Attributes

We are elaborating the fully qualified name of a package clause. In this case, identifiers should never be imported.

We are elaborating the fully qualified name of a package clause. In this case, identifiers should never be imported.

Attributes

We are in a pattern alternative

We are in a pattern alternative

Attributes

Are we resolving a TypeTest node?

Are we resolving a TypeTest node?

Attributes

We are typing the body of an inline method

We are typing the body of an inline method

Attributes

We are in the IDE

We are in the IDE

Attributes

val None: Mode

Use Scala2 scheme for overloading and implicit resolution

Use Scala2 scheme for overloading and implicit resolution

Attributes

val Pattern: Mode

Don't suppress exceptions thrown during show

Don't suppress exceptions thrown during show

Attributes

val Printing: Mode

We are currently printing something: avoid producing more logs about the printing.

We are currently printing something: avoid producing more logs about the printing.

Attributes

Are we in a quote in a pattern?

Are we in a quote in a pattern?

Attributes

Read original positions when unpickling from TASTY

Read original positions when unpickling from TASTY

Attributes

This mode is enabled when we check Java overriding in explicit nulls. Type Null becomes a subtype of non-primitive value types in TypeComparer.

This mode is enabled when we check Java overriding in explicit nulls. Type Null becomes a subtype of non-primitive value types in TypeComparer.

Attributes

Are we enforcing null safety?

Are we enforcing null safety?

Attributes

We are currently unpickling Scala2 info

We are currently unpickling Scala2 info

Attributes

Assume -language:strictEquality

Assume -language:strictEquality

Attributes

We are synthesizing the receiver of an extension method

We are synthesizing the receiver of an extension method

Attributes

val Type: Mode

This mode bit is set if we collect information without reference to a valid context with typerstate and constraint. This is typically done when we cache the eligibility of implicits. Caching needs to be done across different constraints. Therefore, if TypevarsMissContext is set, subtyping becomes looser, and assumes that TypeParamRefs can be sub- and supertypes of anything. See TypeComparer.

This mode bit is set if we collect information without reference to a valid context with typerstate and constraint. This is typically done when we cache the eligibility of implicits. Caching needs to be done across different constraints. Therefore, if TypevarsMissContext is set, subtyping becomes looser, and assumes that TypeParamRefs can be sub- and supertypes of anything. See TypeComparer.

Attributes