public override void SetIndex(Node node, AnalysisUnit unit, IAnalysisSet index, IAnalysisSet value) { double?constIndex = GetConstantIndex(index); if (constIndex != null && constIndex.Value < IndexTypes.Length) { // TODO: Warn if outside known index and no appends? IndexTypes[(int)constIndex.Value].AddTypes(unit, value, declaringScope: ProjectEntry); } _unionType.AddTypes(unit, value, declaringScope: ProjectEntry); base.SetIndex(node, unit, index, value); }
/// <summary> /// Makes this analysis value include all of the source analysis /// values and automatically pick up new values if the source /// changes. /// </summary> /// <param name="source"></param> public void AddLinkedValue(AnalysisUnit unit, ExpandoValue source) { if (_linkedValues == null) { _linkedValues = new TypedDef(); } _linkedValues.AddTypes(unit, source.SelfSet); }