Scala Compiler 2.13.16 - scala.tools.nsc.typechecker.Infer
Keywords: Scala Compiler 2.13.16 scala.tools.nsc.typechecker.Infer

Scala Compiler2.13.16 < 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
-  package splain
  Definition Classes
    typechecker
- Adaptations
- Analyzer
- AnalyzerPlugins
- Checkable
- ConstantFolder
- ContextErrors
- ContextMode
- Contexts
- DestructureTypes
- Duplicators
- EtaExpansion
- Fingerprint
- Implicits
- ImplicitsStats
- ImportTracking
- Infer
- MacroAnnotationAttachments
- MacroAnnotationNamers
- Macros
- MacrosStats
- MethodSynthesis
- Namers
- NamesDefaults
- PatternTypers
- RefChecks
- StdAttachments
- StructuredTypeStrings
- SuperAccessors
- SyntheticMethods
- Tags
- TreeCheckers
- TypeDiagnostics
- TypeStrings
- Typers
- TypersStats
- TypersTracking
- Unapplies

t

scala.tools.nsc.typechecker

# Infer

###

#### trait Infer extends Checkable

This trait contains methods related to type parameter inference.

Self Type
  Analyzer
Source
  Infer.scala

Linear Supertypes
Checkable, AnyRef, Any
Known Subclasses
erasure, treeChecker, ScaladocAnalyzer, InteractiveAnalyzer, Erasure, Duplicator, SpecializationDuplicator, Analyzer, Duplicators, TreeCheckers
Type Hierarchy

Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. Infer
2. Checkable
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. Protected

### Type Members

1.  trait InferCheckable extends AnyRef
   Definition Classes
     Checkable
2.  final case class AdjustedTypeArgs(okParams: List[Global.Symbol], okArgs: List[Global.Type], undetParams: List[Global.Symbol], allArgs: List[Global.Type]) extends Product with Serializable
3.  type Checkability = Int
   Definition Classes
     Checkable
4.  abstract class Inferencer extends Analyzer.InferencerContextErrors with Analyzer.InferCheckable

   The context-dependent inferencer part

5.  class NoInstance extends ControlThrowable

### Value Members

1.  object Checkability
   Definition Classes
     Checkable
2.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
3.  final def ##: Int
   Definition Classes
     AnyRef → Any
4.  def +(other: String): String
   Implicit
     This member is added by an implicit conversion from Infer toany2stringadd[Infer] performed by method any2stringadd in scala.Predef.
   Definition Classes
     any2stringadd
5.  def ->[B](y: B): (Infer, B)
   Implicit
     This member is added by an implicit conversion from Infer toArrowAssoc[Infer] performed by method ArrowAssoc in scala.Predef.
   Definition Classes
     ArrowAssoc
   Annotations
     @inline()
6.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
7.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
8.  def clone(): AnyRef
   Attributes
     protected[lang]
   Definition Classes
     AnyRef
   Annotations
     @throws(classOf[java.lang.CloneNotSupportedException]) @native()
9.  def ensuring(cond: (Infer) => Boolean, msg: => Any): Infer
   Implicit
     This member is added by an implicit conversion from Infer toEnsuring[Infer] performed by method Ensuring in scala.Predef.
   Definition Classes
     Ensuring
10.  def ensuring(cond: (Infer) => Boolean): Infer
    Implicit
      This member is added by an implicit conversion from Infer toEnsuring[Infer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
11.  def ensuring(cond: Boolean, msg: => Any): Infer
    Implicit
      This member is added by an implicit conversion from Infer toEnsuring[Infer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
12.  def ensuring(cond: Boolean): Infer
    Implicit
      This member is added by an implicit conversion from Infer toEnsuring[Infer] performed by method Ensuring in scala.Predef.
    Definition Classes
      Ensuring
13.  final def eq(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
14.  def equals(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef → Any
15.  final def falseIfNoInstance(body: => Boolean): Boolean
    Annotations
      @inline()
16.  def finalize(): Unit
    Attributes
      protected[lang]
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.Throwable])
17.  def formalTypes(formals: List[Global.Type], numArgs: Int, removeByName: Boolean = true, removeRepeated: Boolean = true): List[Global.Type]

    The formal parameter types corresponding to `formals`.

    The formal parameter types corresponding to `formals`. If `formals` has a repeated last parameter, a list of (numArgs - numFormals + 1) copies of its type is appended to the other formals. By-name types are replaced with their underlying type.

    removeByName

      allows keeping ByName parameters. Used in NamesDefaults.

    removeRepeated

      allows keeping repeated parameter (if there's one argument). Used in NamesDefaults.

18.  def freshVar(tparam: Global.Symbol): Global.TypeVar

    A fresh type variable with given type parameter as origin.

19.  final def getClass(): Class[_ <: AnyRef]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
20.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
21.  def instantiateSamFromFunction(funTp: Global.Type, samTp: Global.Type, sam: Global.Symbol): Global.Type
22.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
23.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
24.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
25.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
26.  def propagateKnownTypes(from: Global.Type, to: Global.Symbol): Global.Type

    The applied type of class 'to' after inferring anything possible from the knowledge that 'to' must also be of the type given in 'from'.

    The applied type of class 'to' after inferring anything possible from the knowledge that 'to' must also be of the type given in 'from'.

    Definition Classes
      Checkable
27.  def skipImplicit(tp: Global.Type): Global.Type
28.  def solvedTypes(tvars: List[Global.TypeVar], tparams: List[Global.Symbol], getVariance: Extractor[Global.Symbol], upper: Boolean, depth: Depth): List[Global.Type]

    Solve constraint collected in types `tvars`.

    Solve constraint collected in types `tvars`.

    tvars

      All type variables to be instantiated.

    tparams

      The type parameters corresponding to `tvars`

    getVariance

      Function to extract variances of type parameters; we need to reverse solution direction for all contravariant variables.

    upper

      When `true` search for max solution else min.

    Exceptions thrown
29.  final def synchronized[T0](arg0: => T0): T0
    Definition Classes
      AnyRef
30.  def toString(): String
    Definition Classes
      AnyRef → Any
31.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
32.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException])
33.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws(classOf[java.lang.InterruptedException]) @native()
34.  object approximateAbstracts extends Global.TypeMap
35.  object instantiate extends Global.TypeMap

    Map every TypeVar to its constraint.inst field.

    Map every TypeVar to its constraint.inst field. throw a NoInstance exception if a NoType or WildcardType is encountered.

36.  object toOrigin extends Global.TypeMap

### Deprecated Value Members

1.  def formatted(fmtstr: String): String
   Implicit
     This member is added by an implicit conversion from Infer toStringFormat[Infer] 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): (Infer, B)
   Implicit
     This member is added by an implicit conversion from Infer toArrowAssoc[Infer] 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 Checkable

### Inherited from AnyRef

### Inherited from Any

### Inherited by implicit conversion any2stringadd fromInfer to any2stringadd[Infer]

### Inherited by implicit conversion StringFormat fromInfer to StringFormat[Infer]

### Inherited by implicit conversion Ensuring fromInfer to Ensuring[Infer]

### Inherited by implicit conversion ArrowAssoc fromInfer to ArrowAssoc[Infer]

### Ungrouped