Mode

dotty.tools.dotc.core.Mode
See theMode companion object
final case class Mode(bits: Int) extends AnyVal

A collection of mode bits that are part of a context.

What's the difference between a boolean setting and a Mode? A setting is usually valid for the entire compilation run, whereas a mode is context specific. Changing a setting in a context creates a new SettingsState in that context, which is a relatively big object. By comparison, a mode is just an Int. But, Mode bits are a scarce resource, so for low priority situations, just reset the state with a setting. Also, a setting is externally settable, while a mode isn't.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class AnyVal
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def !=(that: Mode): Boolean
def &(that: Mode): Mode
def &~(that: Mode): Mode
def ==(that: Mode): Boolean
def is(that: Mode): Boolean

Are we in the body of quoted pattern?

Are we in the body of quoted pattern?

Attributes

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
Any
def |(that: Mode): Mode

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product