internal override TypeWithModifiers Substitute(AbstractTypeMap typeMap) { TypeWithModifiers substitutedReferencedType = typeMap.SubstituteType(_referencedType); return substitutedReferencedType.Is(_referencedType) ? new TypeWithModifiers(this) : new TypeWithModifiers(new ByRefReturnErrorTypeSymbol(substitutedReferencedType.Type, _countOfCustomModifiersPrecedingByRef), substitutedReferencedType.CustomModifiers); }
internal override TypeWithModifiers Substitute(AbstractTypeMap typeMap) { TypeWithModifiers substitutedReferencedType = typeMap.SubstituteType(_referencedType); return(substitutedReferencedType.Is(_referencedType) ? new TypeWithModifiers(this) : new TypeWithModifiers(new ByRefReturnErrorTypeSymbol(substitutedReferencedType.Type, _countOfCustomModifiersPrecedingByRef), substitutedReferencedType.CustomModifiers)); }
public TypeWithModifiers SubstituteType(AbstractTypeMap typeMap) { var newTypeWithModifiers = typeMap.SubstituteType(this.Type); if (!newTypeWithModifiers.Is(this.Type)) { return(new TypeWithModifiers(newTypeWithModifiers.Type, this.CustomModifiers.Concat(newTypeWithModifiers.CustomModifiers))); } else { return(this); // substitution had no effect on the type } }
private static TypeSymbol SubstituteAllTypeParameters(AbstractTypeMap substitution, TypeSymbol type) { if (substitution != null) { TypeSymbol previous; do { previous = type; type = substitution.SubstituteType(type); } while (type != previous); } return type; }
internal override ErrorTypeSymbol Substitute(AbstractTypeMap typeMap) { TypeSymbol substitutedReferencedType = typeMap.SubstituteType(_referencedType); return(substitutedReferencedType == _referencedType ? this : new ByRefReturnErrorTypeSymbol(substitutedReferencedType)); }
internal override ErrorTypeSymbol Substitute(AbstractTypeMap typeMap) { TypeSymbol substitutedReferencedType = typeMap.SubstituteType(this.referencedType); return substitutedReferencedType == this.referencedType ? this : new ByRefReturnErrorTypeSymbol(substitutedReferencedType); }