Scala Compiler2.12.5 < 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
-  trait Typers extends Adaptations with Tags with TypersTracking with PatternTypers

  This trait provides methods to assign types to trees.

  This trait provides methods to assign types to trees.

  Definition Classes
    typechecker
  Version

    1.0

-  abstract class Typer extends Analyzer.TyperDiagnostics with Analyzer.Adaptation with Analyzer.Tag with Analyzer.PatternTyper with Analyzer.TyperContextErrors
  Definition Classes
    Typers
- TyperErrorGen
- checkDead
- checkNoEscaping
- checkUnused
- dyna

o

scala.tools.nsc.typechecker.Typers.Typer

# dyna 

###

#### object dyna

Source
  Typers.scala

Linear Supertypes
AnyRef, Any
 
Ordering

1. Alphabetic
2. By Inheritance

Inherited

1. dyna
2. AnyRef
3. Any

1. Hide All
2. Show All

Visibility

1. Public
2. All

### Value Members

1.  final def !=(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
2.  final def ##(): Int
   Definition Classes
     AnyRef → Any
3.  final def ==(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
4.  def acceptsApplyDynamic(tp: Global.Type): Boolean
5.  def acceptsApplyDynamicWithType(qual: Global.Tree, name: Global.Name): Option[Global.Type]

   Returns `Some(t)` if `name` can be selected dynamically on `qual`, `None` if not.

   Returns `Some(t)` if `name` can be selected dynamically on `qual`, `None` if not. `t` specifies the type to be passed to the applyDynamic/selectDynamic call (unless it is NoType) NOTE: currently either returns None or Some(NoType) (scala-virtualized extends this to Some(t) for selections on staged Structs)

6.  final def asInstanceOf[T0]: T0
   Definition Classes
     Any
7.  def clone(): AnyRef
   Attributes
     protected[java.lang]
   Definition Classes
     AnyRef
   Annotations
     @native() @throws( ... )
8.  final def eq(arg0: AnyRef): Boolean
   Definition Classes
     AnyRef
9.  def equals(arg0: Any): Boolean
   Definition Classes
     AnyRef → Any
10.  def finalize(): Unit
    Attributes
      protected[java.lang]
    Definition Classes
      AnyRef
    Annotations
      @throws( classOf[java.lang.Throwable] )
11.  final def getClass(): Class[_]
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
12.  def hashCode(): Int
    Definition Classes
      AnyRef → Any
    Annotations
      @native()
13.  def isApplyDynamicNamed(fun: Global.Tree): Boolean
14.  def isDynamicallyUpdatable(tree: Global.Tree): Boolean
15.  final def isInstanceOf[T0]: Boolean
    Definition Classes
      Any
16.  def mkInvoke(context: Analyzer.Context, tree: Global.Tree, qual: Global.Tree, name: Global.Name): Option[Global.Tree]

    Translate selection that does not typecheck according to the normal rules into a selectDynamic/applyDynamic.

    Translate selection that does not typecheck according to the normal rules into a selectDynamic/applyDynamic.

    foo.method("blah") ~~> foo.applyDynamic("method")("blah") foo.method(x = "blah") ~~> foo.applyDynamicNamed("method")(("x", "blah")) foo.varia = 10 ~~> foo.updateDynamic("varia")(10) foo.field ~~> foo.selectDynamic("field") foo.arr(10) = 13 ~~> foo.selectDynamic("arr").update(10, 13)

    what if we want foo.field == foo.selectDynamic("field") == 1, but `foo.field = 10` == `foo.selectDynamic("field").update(10)` == () what would the signature for selectDynamic be? (hint: it needs to depend on whether an update call is coming or not)

    need to distinguish selectDynamic and applyDynamic somehow: the former must return the selected value, the latter must accept an apply or an update

    - could have only selectDynamic and pass it a boolean whether more is to come, so that it can either return the bare value or something that can handle the apply/update HOWEVER that makes it hard to return unrelated values for the two cases --> selectDynamic's return type is now dependent on the boolean flag whether more is to come
    - simplest solution: have two method calls
17.  final def ne(arg0: AnyRef): Boolean
    Definition Classes
      AnyRef
18.  final def notify(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
19.  final def notifyAll(): Unit
    Definition Classes
      AnyRef
    Annotations
      @native()
20.  final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
      AnyRef
21.  def toString(): String
    Definition Classes
      AnyRef → Any
22.  def typedNamedApply(orig: Global.Tree, fun: Global.Tree, args: List[Global.Tree], mode: Mode, pt: Global.Type): Global.Tree
23.  final def wait(): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
24.  final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
      AnyRef
    Annotations
      @throws( ... )
25.  final def wait(arg0: Long): Unit
    Definition Classes
      AnyRef
    Annotations
      @native() @throws( ... )
26.  def wrapErrors(tree: Global.Tree, typeTree: (Analyzer.Typer) ⇒ Global.Tree): Global.Tree

### Inherited from AnyRef

### Inherited from Any

### Ungrouped