public override DataType Clone(IDictionary <DataType, DataType>?clonedTypes) { var pre = PreferredType?.Clone(clonedTypes); var u = new UnionType(Name, pre); u.Qualifier = Qualifier; u.UserDefined = UserDefined; foreach (var a in this.Alternatives.Values) { u.Alternatives.Add(a.Clone()); } return(u); }
public override DataType Clone() { DataType pre = PreferredType != null?PreferredType.Clone() : null; UnionType u = new UnionType(Name, pre); u.UserDefined = UserDefined; foreach (UnionAlternative a in this.Alternatives.Values) { u.Alternatives.Add(a.Clone()); } return(u); }