RecType

dotty.tools.dotc.core.Types$.RecType$
See theRecType companion class
object RecType

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
RecType.type

Members list

Value members

Concrete methods

def apply(parentExp: RecType => Type)(using Context): RecType

Create a RecType, normalizing its contents. This means:

Create a RecType, normalizing its contents. This means:

  1. Nested Rec types on the type's spine are merged with the outer one.
  2. Any refinement of the form type T = z.T on the spine of the type where z refers to the created rec-type is replaced by type T. This avoids infinite recursions later when we try to follow these references. TODO: Figure out how to guarantee absence of cycles of length > 1

Attributes

def closeOver(parentExp: RecType => Type)(using Context): Type

Create a RecType, but only if the type generated by parentExp is indeed recursive.

Create a RecType, but only if the type generated by parentExp is indeed recursive.

Attributes