LevelAvoidMap
An approximating map that prevents types nested deeper than maxLevel as well as WildcardTypes from leaking into the constraint.
Value members
Concrete methods
Inherited methods
- 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.
- Definition Classes
- Inherited from:
- AvoidMap
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.
- 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
- Inherited from:
- ApproximatingTypeMap
True iff all NamedTypes on this prefix are static
True iff all NamedTypes on this prefix are static
- Definition Classes
- Inherited from:
- AvoidMap
Can be overridden. By default, only the prefix is mapped.
Can be overridden. By default, only the prefix is mapped.
- Inherited from:
- TypeMap
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.
- Inherited from:
- ApproximatingTypeMap