Mode

object Mode
Companion:
class
class Object
trait Matchable
class Any
Mode.type

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

We are currently checking bounds to be non-empty, so we should not do any widening when computing members of refined types.

We are currently checking bounds to be non-empty, so we should not do any widening when computing members of refined types.

Are we looking for cyclic references?

Are we looking for cyclic references?

Are we trying to find a hidden implicit?

Are we trying to find a hidden implicit?

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.

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.

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.

Are we typechecking the rhs of an extension method?

Are we typechecking the rhs of an extension method?

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.

We are in a pattern alternative

We are in a pattern alternative

Are we resolving a TypeTest node?

Are we resolving a TypeTest node?

We are typing the body of an inline method

We are typing the body of an inline method

We are in the IDE

We are in the IDE

val None: Mode

Use Scala2 scheme for overloading and implicit resolution

Use Scala2 scheme for overloading and implicit resolution

Don't suppress exceptions thrown during show

Don't suppress exceptions thrown during show

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

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

Are we in a quote in a pattern?

Are we in a quote in a pattern?

Read original positions when unpickling from TASTY

Read original positions when unpickling from TASTY

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.

Are we enforcing null safety?

Are we enforcing null safety?

We are currently unpickling Scala2 info

We are currently unpickling Scala2 info

Assume -language:strictEquality

Assume -language:strictEquality

We are synthesizing the receiver of an extension method

We are synthesizing the receiver of an extension method

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.