Scala Compiler2.13.9 < 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 typechecker
  Definition Classes
    nsc
-  abstract class RefChecks extends SubComponent with Transform

  Post-attribution checking and transformation.

  Post-attribution checking and transformation.

  This phase checks the following postconditions:

  - All overrides conform to rules.
  - All type arguments conform to bounds.
  - Every use of a type variable conforms to the variance annotation of that variable.
  - No forward reference to a term symbol extends beyond a value definition.

  It performs the following transformations:

  - Local modules are replaced by variables and classes.
  - Calls to case factory methods are replaced by new's.
  - Eliminate branches in a conditional if the condition is a constant.
  Definition Classes
    typechecker
- Phase
- RefCheckTransformer
- StdPhase

c

scala.tools.nsc.typechecker.RefChecks

# RefCheckTransformer

###

#### class RefCheckTransformer extends Global.AstTransformer

Source
  RefChecks.scala

Linear Supertypes
Global.Transformer, Global.InternalTransformer, Global.Transformer, AnyRef, Any
Type Hierarchy

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. RefCheckTransformer
2. Transformer
3. InternalTransformer
4. Transformer
5. AnyRef
6. Any

Implicitly

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

1. Hide All
2. Show All

Visibility

1. Public
2. Protected

### Instance Constructors

1.  new RefCheckTransformer(unit: Global.CompilationUnit)

### Type Members

1.  class LevelInfo extends AnyRef

### 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 RefCheckTransformer toany2stringadd[RefCheckTransformer] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
4.  def ->[B](y: B): (RefCheckTransformer, B)
   Implicit
     This member is added by an implicit conversion from RefCheckTransformer toArrowAssoc[RefCheckTransformer] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
5.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
6.  def addVarargBridges(clazz: Global.Symbol): List[Global.Tree]

   Add bridges for vararg methods that extend Java vararg methods

7.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
8.  def atOwner[A](owner: Global.Symbol)(trans: => A): A
   Definition Classes
     Transformer
9.  def checkImplicitViewOptionApply(pos: Global.Position, fn: Global.Tree, args: List[Global.Tree]): Unit
10.  def checkInfiniteLoop(sym: Global.Symbol, rhs: Global.Tree): Unit
11.  def checkSensible(pos: Global.Position, fn: Global.Tree, args: List[Global.Tree]): Unit

    Sensibility check examines flavors of equals.

12.  def clone(): AnyRef
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.CloneNotSupportedException]) @native()
13.  var currentApplication: Global.Tree
14.  def currentClass: Global.Symbol
    Attributes
      protected
    Definition Classes
      Transformer
15.  def currentMethod: Global.Symbol
    Attributes
      protected
    Definition Classes
      Transformer
16.  var currentOwner: Global.Symbol
    Attributes
      protected[scala]
    Definition Classes
      Transformer
17.  def ensuring(cond: (RefCheckTransformer) => Boolean, msg: => Any): RefCheckTransformer
    Implicit
      This member is added by an implicit conversion from RefCheckTransformer toEnsuring[RefCheckTransformer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
18.  def ensuring(cond: (RefCheckTransformer) => Boolean): RefCheckTransformer
    Implicit
      This member is added by an implicit conversion from RefCheckTransformer toEnsuring[RefCheckTransformer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
19.  def ensuring(cond: Boolean, msg: => Any): RefCheckTransformer
    Implicit
      This member is added by an implicit conversion from RefCheckTransformer toEnsuring[RefCheckTransformer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
20.  def ensuring(cond: Boolean): RefCheckTransformer
    Implicit
      This member is added by an implicit conversion from RefCheckTransformer toEnsuring[RefCheckTransformer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
21.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
22.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
23.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
24.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
25.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
26.  var inAnnotation: Boolean
27.  var inPattern: Boolean
28.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
29.  var localTyper: (analyzer)#Typer
30.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
31.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
32.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
33.  final def savingInPattern[A](body: => A): A
    Annotations
      @inline()
34.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
35.  def toConstructor(pos: Global.Position, tpe: Global.Type): Global.Tree
36.  def toString(): String
    Definition Classes
      AnyRef → Any
37.  def transform(tree: Global.Tree): Global.Tree
    Definition Classes
      RefCheckTransformer → InternalTransformer → Transformer
38.  def transformCaseDefs(trees: List[Global.CaseDef]): List[Global.CaseDef]
    Definition Classes
      Transformer
39.  def transformIdents(trees: List[Global.Ident]): List[Global.Ident]
    Definition Classes
      Transformer
40.  def transformMemberDefs(trees: List[Global.MemberDef]): List[Global.MemberDef]
    Definition Classes
      Transformer
41.  def transformModifiers(mods: Global.Modifiers): Global.Modifiers
    Definition Classes
      Transformer
42.  def transformStat(tree: Global.Tree, index: Int): Global.Tree
43.  def transformStats(stats: List[Global.Tree], exprOwner: Global.Symbol): List[Global.Tree]
    Definition Classes
      RefCheckTransformer → Transformer
44.  def transformTemplate(tree: Global.Template): Global.Template
    Definition Classes
      Transformer
45.  def transformTrees(trees: List[Global.Tree]): List[Global.Tree]
    Definition Classes
      Transformer
46.  def transformTypeDefs(trees: List[Global.TypeDef]): List[Global.TypeDef]
    Definition Classes
      Transformer
47.  def transformUnit(unit: Global.CompilationUnit): Unit
    Definition Classes
      Transformer
48.  def transformValDef(tree: Global.ValDef): Global.ValDef
    Definition Classes
      Transformer
49.  def transformValDefs(trees: List[Global.ValDef]): List[Global.ValDef]
    Definition Classes
      Transformer
50.  def transformValDefss(treess: List[List[Global.ValDef]]): List[List[Global.ValDef]]
    Definition Classes
      Transformer
51.  val treeCopy: Global.TreeCopier
    Definition Classes
      Transformer
52.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
53.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
54.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()
55.  object normalizeAll extends Global.TypeMap
56.  object varianceValidator extends Global.VarianceValidator

### Deprecated Value Members

1.  def formatted(fmtstr: String): String
   Implicit
     This member is added by an implicit conversion from RefCheckTransformer toStringFormat[RefCheckTransformer] performed by method StringFormat in scala.Predef.
   Definition Classes
     StringFormat
   Annotations
     @deprecated @inline()
   Deprecated

     (Since version 2.12.16) Use `formatString.format(value)` instead of `value.formatted(formatString)`, or use the `f""` string interpolator. In Java 15 and later, `formatted` resolves to the new method in String which has reversed parameters.

2.  def →[B](y: B): (RefCheckTransformer, B)
   Implicit
     This member is added by an implicit conversion from RefCheckTransformer toArrowAssoc[RefCheckTransformer] 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 Global.Transformer

### Inherited from Global.InternalTransformer

### Inherited from Global.Transformer

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd fromRefCheckTransformer to any2stringadd[RefCheckTransformer]

### Inherited by implicit conversion StringFormat fromRefCheckTransformer to StringFormat[RefCheckTransformer]

### Inherited by implicit conversion Ensuring fromRefCheckTransformer to Ensuring[RefCheckTransformer]

### Inherited by implicit conversion ArrowAssoc fromRefCheckTransformer to ArrowAssoc[RefCheckTransformer]

### Ungrouped