Packages

  • package root
    Definition Classes
    root
  • package org
    Definition Classes
    root
  • package scalajs
    Definition Classes
    org
  • package nscplugin
    Definition Classes
    scalajs
  • abstract class PreTyperComponent extends PluginComponent with Transform with CompatComponent

    This jspretyper phase prepares a fix for issue SI-9487 in the case of anonymous classes that extend js.Any.

    This jspretyper phase prepares a fix for issue SI-9487 in the case of anonymous classes that extend js.Any.

    During typer, due to a bug (SI-9487), Scalac transfroms some public method definitions of a quite specific syntactic form of anonymous classes into private methods. This affects both methods and field accessors. This phase identifies any anonymous class and adds a @WasPublicBeforeTyper annotation on its public methods and fields. After the typer in jsinterop the anonymous classes are fixed if they extend js.Any using the annotations as reference.

    As an example:

    class $anon extends ... {
      val foo = ???
      var bar = ???
      def baz = ???
      private val foo2 = ???
      private var bar2 = ???
      private def baz2 = ???
    }

    Would become:

    class $anon extends ... {
      @WasPublicBeforeTyper val foo = ???
      @WasPublicBeforeTyper var bar = ???
      @WasPublicBeforeTyper def baz = ???
      private val foo2 = ???
      private var bar2 = ???
      private def baz2 = ???
    }

    And after typer (if has SI-9487) will be:

    class $anon extends ... {
      @WasPublicBeforeTyper private[this] var foo = ???
      private <stable> <accessor> def foo = ??? // Needs fix
    
      @WasPublicBeforeTyper private[this] var bar = ???
      private <accessor> def bar = ??? // Needs fix
      private <accessor> def bar_=(...) = ??? // Needs fix
    
      @WasPublicBeforeTyper private def baz = ??? // Needs fix
      ...
    }
    Definition Classes
    nscplugin
  • GlobalCompat
  • LowPrioGenBCodeCompat
  • Phase
  • PreTyperTransformer
  • SAMFunctionAttachCompat
  • SAMFunctionAttachCompatDef
  • SAMFunctionCompatOps
  • StdPhase
  • StdTermNamesCompat
  • StdTypeNamesCompat
  • SymbolCompat

class PreTyperTransformer extends scala.tools.nsc.Global.Transformer

Linear Supertypes
scala.tools.nsc.Global.Transformer, scala.tools.nsc.Global.InternalTransformer, scala.tools.nsc.Global.Transformer, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. PreTyperTransformer
  2. Transformer
  3. InternalTransformer
  4. Transformer
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new PreTyperTransformer(unit: scala.tools.nsc.Global.CompilationUnit)

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def atOwner[A](owner: scala.tools.nsc.Global.Symbol)(trans: ⇒ A): A
    Definition Classes
    Transformer
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def currentClass: scala.tools.nsc.Global.Symbol
    Attributes
    protected
    Definition Classes
    Transformer
  8. def currentMethod: scala.tools.nsc.Global.Symbol
    Attributes
    protected
    Definition Classes
    Transformer
  9. var currentOwner: scala.tools.nsc.Global.Symbol
    Attributes
    protected[scala]
    Definition Classes
    Transformer
  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    AnyRef → Any
  21. def transform(tree: scala.tools.nsc.Global.Tree): scala.tools.nsc.Global.Tree
    Definition Classes
    PreTyperTransformer → InternalTransformer → Transformer
  22. def transformCaseDefs(trees: List[scala.tools.nsc.Global.CaseDef]): List[scala.tools.nsc.Global.CaseDef]
    Definition Classes
    Transformer
  23. def transformIdents(trees: List[scala.tools.nsc.Global.Ident]): List[scala.tools.nsc.Global.Ident]
    Definition Classes
    Transformer
  24. def transformMemberDefs(trees: List[scala.tools.nsc.Global.MemberDef]): List[scala.tools.nsc.Global.MemberDef]
    Definition Classes
    Transformer
  25. def transformModifiers(mods: scala.tools.nsc.Global.Modifiers): scala.tools.nsc.Global.Modifiers
    Definition Classes
    Transformer
  26. def transformStats(stats: List[scala.tools.nsc.Global.Tree], exprOwner: scala.tools.nsc.Global.Symbol): List[scala.tools.nsc.Global.Tree]
    Definition Classes
    Transformer
  27. def transformTemplate(tree: scala.tools.nsc.Global.Template): scala.tools.nsc.Global.Template
    Definition Classes
    Transformer
  28. def transformTrees(trees: List[scala.tools.nsc.Global.Tree]): List[scala.tools.nsc.Global.Tree]
    Definition Classes
    Transformer
  29. def transformTypeDefs(trees: List[scala.tools.nsc.Global.TypeDef]): List[scala.tools.nsc.Global.TypeDef]
    Definition Classes
    Transformer
  30. def transformUnit(unit: scala.tools.nsc.Global.CompilationUnit): Unit
    Definition Classes
    Transformer
  31. def transformValDef(tree: scala.tools.nsc.Global.ValDef): scala.tools.nsc.Global.ValDef
    Definition Classes
    Transformer
  32. def transformValDefs(trees: List[scala.tools.nsc.Global.ValDef]): List[scala.tools.nsc.Global.ValDef]
    Definition Classes
    Transformer
  33. def transformValDefss(treess: List[List[scala.tools.nsc.Global.ValDef]]): List[List[scala.tools.nsc.Global.ValDef]]
    Definition Classes
    Transformer
  34. val treeCopy: scala.tools.nsc.Global.TreeCopier
    Definition Classes
    Transformer
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from scala.tools.nsc.Global.Transformer

Inherited from scala.tools.nsc.Global.InternalTransformer

Inherited from scala.tools.nsc.Global.Transformer

Inherited from AnyRef

Inherited from Any

Ungrouped