Lines Matching defs:substitution
65 const Substitution *substitution)
71 auto *constraint = typeParam->GetConstraintType()->Substitute(Relation(), substitution);
94 const size_t index, Substitution *substitution, Type *objectParam)
98 IsCompatibleTypeArgument(typeParams[index]->AsETSTypeParameter(), objectParam, substitution) &&
100 substitution->emplace(typeParams[index]->AsETSTypeParameter(), objectParam);
108 const Type *paramType, Substitution *substitution)
140 res = InsertTypeIntoSubstitution(typeParams, paramTypeArgs[j], j, substitution, objectParams[j]);
143 argType->AsETSObjectType()->TypeArguments()[j], substitution);
151 Type *argumentType, Substitution *substitution)
154 substitution);
159 Substitution *substitution)
168 substitution->count(originalTparam) == 0) {
174 ETSChecker::EmplaceSubstituted(substitution, originalTparam, argumentType);
175 return IsCompatibleTypeArgument(tparam, argumentType, substitution);
180 return EnhanceSubstitutionForReadonly(typeParams, paramType->AsETSReadonlyType(), argumentType, substitution);
183 return EnhanceSubstitutionForUnion(typeParams, paramType->AsETSUnionType(), argumentType, substitution);
187 EnhanceSubstitutionForGenericType(typeParams, argumentType, paramType, substitution)) {
190 return EnhanceSubstitutionForObject(typeParams, paramType->AsETSObjectType(), argumentType, substitution);
193 return EnhanceSubstitutionForArray(typeParams, paramType->AsETSArrayType(), argumentType, substitution);
200 Type *argumentType, Substitution *substitution)
205 [this, typeParams, argumentType, substitution](Type *ctype) {
206 return EnhanceSubstitutionForType(typeParams, ctype, argumentType, substitution) &&
208 (substitution->find(ctype->AsETSTypeParameter()) != substitution->end() &&
209 Relation()->IsAssignableTo(argumentType, substitution->at(ctype->AsETSTypeParameter()))));
224 if (!EnhanceSubstitutionForType(typeParams, pc, ac, substitution)) {
232 if (!EnhanceSubstitutionForType(typeParams, pc, newArg, substitution)) {
240 Type *argumentType, Substitution *substitution)
244 auto const enhance = [this, typeParams, substitution](Type *ptype, Type *atype) {
245 return EnhanceSubstitutionForType(typeParams, ptype, atype, substitution);
290 Type *const argumentType, Substitution *const substitution)
295 return EnhanceSubstitutionForType(typeParams, paramType->ElementType(), elementType, substitution);
1504 auto *substitution = NewSubstitution();
1509 ETSChecker::EmplaceSubstituted(substitution, targetTypeParams[ix]->AsETSTypeParameter(), sourceTypeParams[ix]);
1511 return target->Substitute(Relation(), substitution);