Feature

dotty.tools.dotc.config.Feature
object Feature

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Feature.type

Members list

Value members

Concrete methods

Is auto-tupling enabled?

Is auto-tupling enabled?

Attributes

def ccEnabled(using Context): Boolean

Is capture checking enabled for this compilation unit?

Is capture checking enabled for this compilation unit?

Attributes

Is capture checking enabled by a command-line setting?

Is capture checking enabled by a command-line setting?

Attributes

Is captureChecking enabled for any of the currently compiled compilation units?

Is captureChecking enabled for any of the currently compiled compilation units?

Attributes

def checkExperimentalDef(sym: Symbol, srcPos: SrcPos)(using Context): Unit
def checkExperimentalFeature(which: String, srcPos: SrcPos, note: => String = ...)(using Context): Unit
def checkPreviewDef(sym: Symbol, srcPos: SrcPos)(using Context): Unit
def checkPreviewFeature(which: String, srcPos: SrcPos, note: => String = ...)(using Context): Unit
def enabled(feature: TermName)(using Context): Boolean

Is feature enabled by either a command line setting or an import?

Is feature enabled by either a command line setting or an import?

Value parameters

feature

The name of the feature

owner

The prefix symbol (nested in scala.language) where the feature is defined.

Attributes

def enabledByImport(feature: TermName)(using Context): Boolean

Is feature enabled by by an import? This is the case if the feature is imported by a named import

Is feature enabled by by an import? This is the case if the feature is imported by a named import

 import owner.feature

and there is no visible nested import that excludes the feature, as in

 import owner.{ feature => _ }

Attributes

def enabledBySetting(feature: TermName)(using Context): Boolean

Is feature enabled by by a command-line setting? The enabling setting is

Is feature enabled by by a command-line setting? The enabling setting is

 -language:feature

where is the fully qualified name of owner, followed by a ".", but subtracting the prefix scala.language. at the front.

Attributes

Experimental language imports that imply that the importing unit is experimental.

Experimental language imports that imply that the importing unit is experimental.

Attributes

def handleGlobalLanguageImport(prefix: TermName, imported: Name)(using Context): Boolean

Handle a global language import import language... Sets the compilation unit's and current run's fields accordingly.

Handle a global language import import language... Sets the compilation unit's and current run's fields accordingly.

Attributes

Returns

true iff the import was handled

def migrateTo3(using Context): Boolean

Is pureFunctions enabled for this compilation unit?

Is pureFunctions enabled for this compilation unit?

Attributes

Is pureFunctions enabled for any of the currently compiled compilation units?

Is pureFunctions enabled for any of the currently compiled compilation units?

Attributes

Is safe mode set for this compilation unit?

Is safe mode set for this compilation unit?

Attributes

Is separation checking enabled for this compilation unit?

Is separation checking enabled for this compilation unit?

Attributes

def warnOnMigration(msg: Message, pos: SrcPos, version: SourceVersion)(using Context): Boolean

If current source migrates to version, issue given warning message and return true, otherwise return false.

If current source migrates to version, issue given warning message and return true, otherwise return false.

Attributes

Concrete fields

Global language imports that affect parsing and must be handled specially. These need per-compilation-unit flags (set in handleGlobalLanguageImport) and also require propagation to rootCtx in the REPL and hoisting in the snippet compiler so they take effect across inputs (i16250).

Global language imports that affect parsing and must be handled specially. These need per-compilation-unit flags (set in handleGlobalLanguageImport) and also require propagation to rootCtx in the REPL and hoisting in the snippet compiler so they take effect across inputs (i16250).

Attributes

val into: TermName
val safe: TermName