public IEnumerable <IReferenceable> GetDefinitions(string name) { var result = new List <IReferenceable>(); VariableDef def; if (_scope.TryGetVariable(name, out def)) { result.Add(def); } if (Push()) { try { result.AddRange(Bases.SelectMany(b => GetDefinitions(name, b))); result.AddRange(GetDefinitions(name, SubClasses.TypesNoCopy)); } finally { Pop(); } } return(result); }