Scala Compiler2.13.0 < Back


# Packages

-  package root

  The Scala compiler and reflection APIs.

  The Scala compiler and reflection APIs.

  Definition Classes
    root
-  package scala
  Definition Classes
    root
-  package tools
  Definition Classes
    scala
-  package nsc
  Definition Classes
    tools
-  package transform
  Definition Classes
    nsc
-  package patmat
  Definition Classes
    transform
-  trait MatchOptimization extends MatchTreeMaking with MatchAnalysis

  Optimize and analyze matches based on their TreeMaker-representation.

  Optimize and analyze matches based on their TreeMaker-representation.

  The patmat translation doesn't rely on this, so it could be disabled in principle.

  - well, not quite: the backend crashes if we emit duplicates in switches (e.g. scala/bug#7290)
  Definition Classes
    patmat
-  trait SwitchEmission extends TreeMakers with MatchMonadInterface
  Definition Classes
    MatchOptimization
- AbsCodegen
- AlternativesTreeMaker
- BodyTreeMaker
- Casegen
- CommonCodegen
- CondTreeMaker
- EmptySubstitution
- EqualityTestTreeMaker
- ExtractorTreeMaker
- FunTreeMaker
- GuardTreeMaker
- IrrefutableExtractorTreeMaker
- NoNewBinders
- NonNullTestTreeMaker
- PreserveSubPatBinders
- ProductExtractorTreeMaker
- RegularSwitchMaker
- SubstOnlyTreeMaker
- Substitution
- SwitchMaker
- TreeMaker
- TrivialTreeMaker
- TypeTestTreeMaker

c

scala.tools.nsc.transform.patmat.MatchOptimization.SwitchEmission

# RegularSwitchMaker

###

#### class RegularSwitchMaker extends SwitchMaker

Source
  MatchOptimization.scala

Linear Supertypes
SwitchMaker, AnyRef, Any
Type Hierarchy

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. RegularSwitchMaker
2. SwitchMaker
3. AnyRef
4. Any

Implicitly

1. by any2stringadd
2. by StringFormat
3. by Ensuring
4. by ArrowAssoc

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Instance Constructors

1.  new RegularSwitchMaker(scrutSym: Global.Symbol, matchFailGenOverride: Option[(Global.Tree) => Global.Tree], unchecked: Boolean)

### Type Members

1.  abstract class SwitchableTreeMakerExtractor extends AnyRef
   Definition Classes
     SwitchMaker

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  def +(other: String): String
   Implicit
     This member is added by an implicit conversion from RegularSwitchMaker toany2stringadd[RegularSwitchMaker] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
4.  def ->[B](y: B): (RegularSwitchMaker, B)
   Implicit
     This member is added by an implicit conversion from RegularSwitchMaker toArrowAssoc[RegularSwitchMaker] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
5.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
6.  val alternativesSupported: Boolean
   Definition Classes
     RegularSwitchMaker → SwitchMaker
7.  def apply(cases: List[(Global.Symbol, List[SwitchEmission.TreeMaker])], pt: Global.Type): List[Global.CaseDef]
   Definition Classes
     SwitchMaker
8.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
9.  val canJump: Boolean
   Definition Classes
     RegularSwitchMaker → SwitchMaker
10.  def clone(): AnyRef
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.CloneNotSupportedException]) @native()
11.  def defaultBody: Global.Tree
    Definition Classes
      RegularSwitchMaker → SwitchMaker
12.  def defaultCase(scrutSym: Global.Symbol = defaultSym, guard: Global.Tree = EmptyTree, body: Global.Tree = defaultBody): Global.CaseDef
    Definition Classes
      RegularSwitchMaker → SwitchMaker
13.  def defaultSym: Global.Symbol
    Definition Classes
      RegularSwitchMaker → SwitchMaker
14.  def ensuring(cond: (RegularSwitchMaker) => Boolean, msg: => Any): RegularSwitchMaker
    Implicit
      This member is added by an implicit conversion from RegularSwitchMaker toEnsuring[RegularSwitchMaker] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
15.  def ensuring(cond: (RegularSwitchMaker) => Boolean): RegularSwitchMaker
    Implicit
      This member is added by an implicit conversion from RegularSwitchMaker toEnsuring[RegularSwitchMaker] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
16.  def ensuring(cond: Boolean, msg: => Any): RegularSwitchMaker
    Implicit
      This member is added by an implicit conversion from RegularSwitchMaker toEnsuring[RegularSwitchMaker] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
17.  def ensuring(cond: Boolean): RegularSwitchMaker
    Implicit
      This member is added by an implicit conversion from RegularSwitchMaker toEnsuring[RegularSwitchMaker] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
18.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
19.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
20.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
21.  def formatted(fmtstr: String): String
    Implicit
      This member is added by an implicit conversion from RegularSwitchMaker toStringFormat[RegularSwitchMaker] performed by method StringFormat in scala.Predef.
    Definition Classes
      StringFormat
    Annotations
      @inline()
22.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
23.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
24.  def isDefault(x: Global.CaseDef): Boolean
    Definition Classes
      RegularSwitchMaker → SwitchMaker
25.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
26.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
27.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
28.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
29.  val switchableTpe: Set[Global.Type]
30.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
31.  def toString(): String
    Definition Classes
      AnyRef → Any
32.  val unchecked: Boolean

    Should exhaustivity analysis be skipped?

    Should exhaustivity analysis be skipped?

    Definition Classes
      RegularSwitchMaker → SwitchMaker
33.  def unreachableCase(cases: List[Global.CaseDef]): Option[Global.CaseDef]
    Definition Classes
      SwitchMaker
34.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
35.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
36.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()
37.  object SwitchablePattern
38.  object SwitchableTreeMaker extends SwitchableTreeMakerExtractor
    Definition Classes
      RegularSwitchMaker → SwitchMaker
39.  object GuardAndBodyTreeMakers
    Definition Classes
      SwitchMaker

### Deprecated Value Members

1.  def →[B](y: B): (RegularSwitchMaker, B)
   Implicit
     This member is added by an implicit conversion from RegularSwitchMaker toArrowAssoc[RegularSwitchMaker] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @deprecated
   Deprecated

     (Since version 2.13.0) Use `->` instead. If you still wish to display it as one character, consider using a font with programming ligatures such as Fira Code.

### Inherited from SwitchMaker

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd fromRegularSwitchMaker to any2stringadd[RegularSwitchMaker]

### Inherited by implicit conversion StringFormat fromRegularSwitchMaker to StringFormat[RegularSwitchMaker]

### Inherited by implicit conversion Ensuring fromRegularSwitchMaker to Ensuring[RegularSwitchMaker]

### Inherited by implicit conversion ArrowAssoc fromRegularSwitchMaker to ArrowAssoc[RegularSwitchMaker]

### Ungrouped