c

org.scalajs.ir.Types

ClosureType

final case class ClosureType(paramTypes: List[Type], resultType: Type, nullable: Boolean) extends Type with Product with Serializable

Closure type.

This is the type of a typed closure. Parameters and result are statically typed according to the closureTypeRef components.

Closure types may be nullable. Null() is a valid value of a nullable closure type. This is unfortunately required to have default values of closure types, which in turn is required to be used as the type of a field.

Closure types are non-variant in both parameter and result types.

Closure types are *not* subtypes of AnyType. That statically prevents them from going into JavaScript code or in any other universal context. They do not support type tests nor casts.

The following subtyping relationships hold for any closure type CT:

nothing <: CT <: void

For a nullable closure type CT, additionally the following subtyping relationship holds:

null <: CT
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ClosureType
  2. Serializable
  3. Product
  4. Equals
  5. Type
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ClosureType(paramTypes: List[Type], resultType: Type, nullable: Boolean)

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 clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. def isNullable: Boolean

    Is null an admissible value of this type?

    Is null an admissible value of this type?

    Definition Classes
    Type
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. val nullable: Boolean
  15. val paramTypes: List[Type]
  16. def productElementNames: Iterator[String]
    Definition Classes
    Product
  17. val resultType: Type
  18. def show(): String
    Definition Classes
    Type
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toNonNullable: ClosureType

    A type that accepts the same values as this type except null, unless this type is VoidType.

    A type that accepts the same values as this type except null, unless this type is VoidType.

    If this is VoidType, returns this type.

    For all other types tpe, tpe.toNonNullable.isNullable is false.

    Definition Classes
    ClosureType → Type
  21. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. 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 Type

Inherited from AnyRef

Inherited from Any

Ungrouped