LevelAvoidMap
An approximating map that prevents types nested deeper than maxLevel as well as WildcardTypes from leaking into the constraint.
Attributes
- Graph
- Supertypes
- class AvoidMaptrait IdempotentCaptRefMapclass AvoidWildcardsMapclass ApproximatingTypeMapclass TypeMapclass VariantTraversalclass Objecttrait Matchableclass Any
Members list
Value members
Concrete methods
Attributes
- Definition Classes
Return a (possibly fresh) type variable of a level no greater than maxLevel
which is:
Return a (possibly fresh) type variable of a level no greater than maxLevel
which is:
- lower-bounded by
tp
if variance >= 0 - upper-bounded by
tp
if variance <= 0 If this isn't possible, return the empty range.
Attributes
Attributes
- Definition Classes
Inherited methods
Attributes
- Inherited from:
- VariantTraversal
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Inherited from:
- TypeMap
Attributes
- Inherited from:
- TypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Three deviations from standard derivedSelect:
Three deviations from standard derivedSelect:
- We first try a widening conversion to the type's info with the original prefix. Since the original prefix is known to be a subtype of the returned prefix, this can improve results.
- Then, if the approximation result is a singleton reference C#x.type, we replace by the widened type, which is usually more natural.
- Finally, we need to handle the case where the prefix type does not have a member
named
tp.name
anymmore. In that case, we need to fall back to Bot..Top.
Attributes
- Definition Classes
- Inherited from:
- AvoidMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Inherited from:
- ApproximatingTypeMap
Expand parameter reference corresponding to prefix pre
;
If the expansion is a wildcard parameter reference, convert its
underlying bounds to a range, otherwise return the expansion.
Expand parameter reference corresponding to prefix pre
;
If the expansion is a wildcard parameter reference, convert its
underlying bounds to a range, otherwise return the expansion.
Attributes
- Inherited from:
- ApproximatingTypeMap
Whether it is currently expanding bounds
Whether it is currently expanding bounds
It is used to avoid following LazyRef in F-Bounds
Attributes
- Inherited from:
- ApproximatingTypeMap
True iff all NamedTypes on this prefix are static
True iff all NamedTypes on this prefix are static
Attributes
- Definition Classes
- Inherited from:
- AvoidMap
Attributes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Inherited from:
- TypeMap
Attributes
- Definition Classes
- Inherited from:
- ApproximatingTypeMap
Can be overridden. By default, only the prefix is mapped.
Map this function over given type
Attributes
- Inherited from:
- TypeMap
Overridden in TypeOps.avoid
Attributes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Inherited from:
- ApproximatingTypeMap
Attributes
- Inherited from:
- VariantTraversal
Attributes
- Inherited from:
- VariantTraversal
Try to widen a named type to its info relative to given prefix pre
, where possible.
The possible cases are listed inline in the code.
Try to widen a named type to its info relative to given prefix pre
, where possible.
The possible cases are listed inline in the code.
Attributes
- Inherited from:
- ApproximatingTypeMap
The type parameters of the constructor of this applied type. Overridden in OrderingConstraint's ConstraintAwareTraversal to take account of instantiations in the constraint that are not yet propagated to the instance types of type variables.
The type parameters of the constructor of this applied type. Overridden in OrderingConstraint's ConstraintAwareTraversal to take account of instantiations in the constraint that are not yet propagated to the instance types of type variables.
Attributes
- Inherited from:
- VariantTraversal
Attributes
- Inherited from:
- ApproximatingTypeMap
Use an alterate type tp
that replaces a range. This can happen if the
prefix of a Select is a range and the selected symbol is an alias type
or a value with a singleton type. In both cases we can forget the prefix
and use the symbol's type.
Use an alterate type tp
that replaces a range. This can happen if the
prefix of a Select is a range and the selected symbol is an alias type
or a value with a singleton type. In both cases we can forget the prefix
and use the symbol's type.
Attributes
- Inherited from:
- ApproximatingTypeMap
Inherited fields
Attributes
- Inherited from:
- AvoidMap