Helper methods to desugar enums
Constructors
Members
Attachment containing the number of enum cases and the smallest kind that was seen so far.
Attachment containing the number of enum cases and the smallest kind that was seen so far.
Add implied flags to an enum class or an enum case
Add implied flags to an enum class or an enum case
Is enum case tree
situated in a companion object of an enum class?
Is enum case tree
situated in a companion object of an enum class?
the enumeration class that is a companion of the current object
the enumeration class that is a companion of the current object
A type tree referring to enumClass
A type tree referring to enumClass
The following lists of definitions for an enum type E:
private val $values = new EnumValues[E] def enumValue = $values.fromInt def enumValueNamed = $values...
The following lists of definitions for an enum type E:
private val $values = new EnumValues[E] def enumValue = $values.fromInt def enumValueNamed = $values.fromName def enumValues = $values.values
A pair consisting of
- a method returning the next enum tag
- scaffolding as defined in nextEnumTag
A pair consisting of
- a method returning the next enum tag
- scaffolding as defined in nextEnumTag
A creation method for a value of enum type E
, which is defined as follows:
private def $new(tag: Int, name: String) = new E { def enumTag = tag override...
A creation method for a value of enum type E
, which is defined as follows:
private def $new(tag: Int, name: String) = new E { def enumTag = tag override def toString = name $values.register(this) }
Expand a module definition representing a parameterless enum case
Expand a module definition representing a parameterless enum case
Expand a simple enum case
Expand a simple enum case
A reference to the enum class E
, possibly followed by type arguments.
Each covariant type parameter is approximated by its lower bound.
Each contravaria...
A reference to the enum class E
, possibly followed by type arguments.
Each covariant type parameter is approximated by its lower bound.
Each contravariant type parameter is approximated by its upper bound.
It is an error if a type parameter is non-variant, or if its approximation
refers to pther type parameters.
Is this an enum case that's situated in a companion object of an enum class?
Is this an enum case that's situated in a companion object of an enum class?
A pair consisting of - the next enum tag - scaffolding containing the necessary definitions for singleton enum cases unless that scaffolding was already...
A pair consisting of
- the next enum tag
- scaffolding containing the necessary definitions for singleton enum cases
unless that scaffolding was already generated by a previous call to nextEnumKind
.
Type parameters reconstituted from the constructor of the `enum' class corresponding to an enum case. The variance is the same as the corresponding type...
Type parameters reconstituted from the constructor of the `enum' class corresponding to an enum case. The variance is the same as the corresponding type parameter of the enum class.