CustomTransientGroundType
Superclass for custom transient ground types used by custom algorithms.
When writing algorithms that manipulate Type
s, it is sometimes useful
to temporarily store custom data in place of Type
s. This can be done
by defining a subclass of CustomTransientGroundType
. At the end of the
day, all CustomTransientGroundType
s should have been replaced by proper
Type
s.
The methods of tasty-query
never expose instances of
CustomTransientGroundType
, but you may use it for your own purposes.
When permorming an exhaustive match
on all possible Type
s, you should
cover CustomTransientGroundType
in a case
that always throws (unless
you are actually using it for some purposes):
val tpe: Type = ...
tpe match
case tpe: TypeRef => ...
...
case tpe: CustomTransientGroundType =>
throw AssertionError(s"Unexpected custom transient ground type $tpe")
end match
Type members
Inherited types
Value members
Inherited methods
The type representing
The type representing
T[U1, ..., Un]
where
- Value Params
- args
=
U1,...,Un
- this
=
T
- Inherited from
- Type
The basetype of this type with given class symbol.
The basetype of this type with given class symbol.
Returns NoType
if this type does not have base
in any of its base
types.
- Inherited from
- Type
Is this type exactly Nothing (no vars, aliases, refinements etc allowed)?
Is this type exactly Nothing (no vars, aliases, refinements etc allowed)?
- Inherited from
- Type
Is this type close enough to that type so that members with the two types would override each other?
Is this type close enough to that type so that members with the two types would override each other?
This means:
- Either both types are polytypes with the same number of type parameters and their result types match after renaming corresponding type parameters
- Or both types are method types with
=:=
-equivalent(*) parameter types and matching result types after renaming corresponding parameter types if the method types are dependent. - Or both types are
=:=
-equivalent - Or neither type takes term or type parameters.
(*) when matching with a Java method, we also regard Any and Object as equivalent parameter types. (TODO)
This function will always use unsafe-nulls semamtics to check the types.
This is because we are using a relaxed rule (ignoring Null
types)
to check overriding Java methods.
- Inherited from
- Type
This is the same as matches
except that it also matches => T
with T
and vice versa.
This is the same as matches
except that it also matches => T
with T
and vice versa.
- Inherited from
- Type
The normalized prefix of this type is:
The normalized prefix of this type is:
- For a type alias, the normalized prefix of its alias.
- For all other named type and class infos: the prefix.
- Inherited by all other type proxies.
NoType
for all other types.
- Inherited from
- Type
Widen singleton types, ExprTypes, AnnotatedTypes and RefinedTypes.
Widen singleton types, ExprTypes, AnnotatedTypes and RefinedTypes.
- Inherited from
- Type
Widen from ExprType type to its result type.
Widen from ExprType type to its result type.
For all other types, return this
.
- Inherited from
- Type