public override IType VisitChildren(TypeVisitor visitor) { IType[] newElementTypes = null; for (int i = 0; i < ElementTypes.Length; i++) { IType type = ElementTypes[i]; var newType = type.AcceptVisitor(visitor); if (newType != type) { if (newElementTypes == null) { newElementTypes = ElementTypes.ToArray(); } newElementTypes[i] = newType; } } if (newElementTypes != null) { return(new TupleType(this.Compilation, newElementTypes.ToImmutableArray(), this.ElementNames, this.GetDefinition()?.ParentModule)); } else { return(this); } }