object Types

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Types
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class ArrayType(arrayTypeRef: ArrayTypeRef) extends Type with Product with Serializable

    Array type.

  2. final case class ArrayTypeRef(baseClassName: String, dimensions: Int) extends TypeRef with Product with Serializable

    Array type.

  3. final case class ClassRef(className: String) extends TypeRef with Product with Serializable

    Class (or interface) type.

  4. final case class ClassType(className: String) extends Type with Product with Serializable

    Class (or interface) type.

  5. final case class RecordType(fields: List[Field]) extends Type with Product with Serializable

    Record type.

    Record type. Used by the optimizer to inline classes as records with multiple fields. They are desugared as several local variables by JSDesugaring. Record types cannot cross method boundaries, so they cannot appear as the type of fields or parameters, nor as result types of methods. The compiler itself never generates record types.

  6. sealed abstract class Type extends AnyRef

    Type of a term (expression or statement) in the IR.

    Type of a term (expression or statement) in the IR.

    There is a many-to-one relationship from TypeRefs to Types, because java.lang.Object and JS types all collapse to AnyType.

    In fact, there are two Types that do not have any real equivalent in type refs: StringType and UndefType, as they refer to the non-null variants of java.lang.String and java.lang.Void, respectively.

  7. sealed abstract class TypeRef extends AnyRef

    Type reference (allowed for classOf[], is/asInstanceOf[]).

    Type reference (allowed for classOf[], is/asInstanceOf[]).

    A TypeRef has exactly the same level of precision as a JVM type. There is a one-to-one relationship between a TypeRef and an instance of java.lang.Class at run-time. This means that:

    • All primitive types have their TypeRef (including scala.Byte and scala.Short), and they are different from their boxed versions.
    • JS types are not erased to any
    • Array types are like on the JVM

    A TypeRef therefore uniquely identifies a classOf[T]. It is also the type refs that are used in method signatures, and which therefore dictate JVM/IR overloading.

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[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def isSubtype(lhs: Type, rhs: Type)(isSubclass: (String, String) ⇒ Boolean): Boolean

    Tests whether a type lhs is a subtype of rhs (or equal).

    Tests whether a type lhs is a subtype of rhs (or equal). NoType is never a subtype or supertype of anything (including itself). All other types are subtypes of themselves.

    isSubclass

    A function testing whether a class/interface is a subclass of another class/interface.

  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  17. def toString(): String
    Definition Classes
    AnyRef → Any
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  21. def zeroOf(tpe: Type)(implicit pos: Position): Literal

    Generates a literal zero of the given type.

  22. object AnyType extends Type with Product with Serializable

    Any type (the top type of this type system).

    Any type (the top type of this type system). A variable of this type can contain any value, including undefined and null and any JS value. This type supports a very limited set of Scala operations, the ones common to all values. Basically only reference equality tests and instance tests. It also supports all JavaScript operations, since all Scala objects are also genuine JavaScript objects. The type java.lang.Object in the back-end maps to AnyType because it can hold JS values (not only instances of Scala.js classes).

  23. object ArrayTypeRef extends Serializable
  24. object BooleanType extends Type with Product with Serializable

    Boolean type.

    Boolean type. It does not accept null nor undefined.

  25. object ByteType extends Type with Product with Serializable

    8-bit signed integer type.

    8-bit signed integer type. It does not accept null nor undefined.

  26. object CharType extends Type with Product with Serializable

    Char type, a 16-bit UTF-16 code unit.

    Char type, a 16-bit UTF-16 code unit. It does not accept null nor undefined.

  27. object DoubleType extends Type with Product with Serializable

    Double type (64-bit).

    Double type (64-bit). It does not accept null nor undefined.

  28. object FloatType extends Type with Product with Serializable

    Float type (32-bit).

    Float type (32-bit). It does not accept null nor undefined.

  29. object IntType extends Type with Product with Serializable

    32-bit signed integer type.

    32-bit signed integer type. It does not accept null nor undefined.

  30. object LongType extends Type with Product with Serializable

    64-bit signed integer type.

    64-bit signed integer type. It does not accept null nor undefined.

  31. object NoType extends Type with Product with Serializable

    No type.

  32. object NothingType extends Type with Product with Serializable

    Nothing type (the bottom type of this type system).

    Nothing type (the bottom type of this type system). Expressions from which one can never come back are typed as Nothing. For example, throw and return.

  33. object NullType extends Type with Product with Serializable

    The type of null.

    The type of null. It does not accept undefined. The null type is a subtype of all class types and array types.

  34. object RecordType extends Serializable
  35. object ShortType extends Type with Product with Serializable

    16-bit signed integer type.

    16-bit signed integer type. It does not accept null nor undefined.

  36. object StringType extends Type with Product with Serializable

    String type.

    String type. It does not accept null nor undefined.

  37. object UndefType extends Type with Product with Serializable

    The type of undefined.

Inherited from AnyRef

Inherited from Any

Ungrouped