dotty.tools.sjs.ir.Types.RecordType
See theRecordType companion object
final case class RecordType(fields: List[Field]) extends 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.
Record types currently do not feature any form of subtyping. For R1 to be a subtype of R2, it must have the same fields, in the same order, with equivalent types.
Record types are not subtypes of any. As such, they can never be passed to JavaScript.
Attributes
- Companion
- object
- Graph
-
- Supertypes
Members list
In this article