Rechecker
The typechecker pass
Attributes
- Graph
-
- Supertypes
- Known subtypes
-
class CaptureChecker
Members list
Value members
Concrete methods
Check that widened types of tpe
and pt
are compatible.
Check that widened types of tpe
and pt
are compatible.
Attributes
Should type of tree
be kept in an attachment so that it can be retrieved with knownType
? By default true only is keepAllTypes
hold, but can be overridden.
Should type of tree
be kept in an attachment so that it can be retrieved with knownType
? By default true only is keepAllTypes
hold, but can be overridden.
Attributes
Finish rechecking a tree node: check rechecked type against expected type and remember rechecked type in a tree attachment if required.
Finish rechecking a tree node: check rechecked type against expected type and remember rechecked type in a tree attachment if required.
Value parameters
- pt
-
the expected type
- tpe
-
the recheched type of
tree
- tree
-
the rechecked tree
Attributes
Keep the symbol of the select
but re-infer its type
Keep the symbol of the select
but re-infer its type
Attributes
Recheck tree without adapting it, returning its new type.
Recheck tree without adapting it, returning its new type.
Value parameters
- pt
-
the expected result type
- tree
-
the original tree
Attributes
Reset all references in prevSelDenots
to the denotations they had before this phase.
Reset all references in prevSelDenots
to the denotations they had before this phase.
Attributes
Typing and previous transforms sometimes leaves skolem types in prefixes of NamedTypes in expected
that do not match the actual
Type. -Ycheck does not complain (need to find out why), but a full recheck does. We compensate by de-skolemizing everywhere in expected
except when variance is negative.
Typing and previous transforms sometimes leaves skolem types in prefixes of NamedTypes in expected
that do not match the actual
Type. -Ycheck does not complain (need to find out why), but a full recheck does. We compensate by de-skolemizing everywhere in expected
except when variance is negative.
Attributes
- Returns
-
If
tp
contains SkolemTypes in covariant or invariant positions, the type where these SkolemTypes are mapped to their underlying type. Otherwise,tp
itself