Packages

sealed case class Closure(flags: ClosureFlags, captureParams: List[ParamDef], params: List[ParamDef], restParam: Option[ParamDef], resultType: Type, body: Tree, captureValues: List[Tree])(implicit pos: Position) extends Tree with Product with Serializable

Closure with explicit captures.

If flags.typed is true, this is a typed closure with a ClosureType. In that case, flags.arrow must be true, and restParam must be None. Typed closures cannot be passed to JavaScript code. This is enforced at the type system level, since ClosureTypes are not subtypes of AnyType. The only meaningful operation one can perform on a typed closure is to call it using ApplyTypedClosure.

If flags.typed is false, this is a JavaScript closure with type AnyNotNullType. In that case, the ptpe or all params and resultType must all be AnyType.

If flags.arrow is true, the closure is an Arrow Function (=>), which does not have a this parameter, and cannot be constructed (called with new). If false, it is a regular Function (function), which does have a this parameter of type AnyType. Typed closures are always Arrow functions, since they do not have a this parameter.

If flags.async is true, it is an async closure. Async closures return a Promise of their body, and can contain JSAwait nodes. flags.typed and flags.async cannot both be true.

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Closure
  2. Serializable
  3. Product
  4. Equals
  5. Tree
  6. TreeOrJSSpread
  7. IRNode
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Closure(flags: ClosureFlags, captureParams: List[ParamDef], params: List[ParamDef], restParam: Option[ParamDef], resultType: Type, body: Tree, captureValues: List[Tree])(implicit pos: Position)

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. val body: Tree
  6. val captureParams: List[ParamDef]
  7. val captureValues: List[Tree]
  8. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. val flags: ClosureFlags
  12. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. val params: List[ParamDef]
  18. implicit val pos: Position
    Definition Classes
    Closure → IRNode
  19. def productElementNames: Iterator[String]
    Definition Classes
    Product
  20. val restParam: Option[ParamDef]
  21. val resultType: Type
  22. def show: String
    Definition Classes
    IRNode
  23. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  24. val tpe: Type
    Definition Classes
    Closure → Tree
  25. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  27. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Tree

Inherited from TreeOrJSSpread

Inherited from IRNode

Inherited from AnyRef

Inherited from Any

Ungrouped