protected override bool EnsureInvariantMeaningInScope(Symbol symbol, Location location, string name, DiagnosticBag diagnostics, Symbol colorColorVariable = null) { if (string.IsNullOrEmpty(name)) { return(false); } bool error = false; bool done = false; SingleMeaning newMeaning = new DirectSingleMeaning(name, symbol, location, colorColorVariable); for (Binder binder = this; binder != null; binder = binder.Next) { var scope = binder as LocalScopeBinder; if (scope == null) { continue; } error |= scope.EnsureSingleDefinition(newMeaning, diagnostics, ref done); if (done || scope is InMethodBinder || error) { break; // no local scopes enclose methods } if (newMeaning.Direct) { newMeaning = new IndirectSingleMeaning((DirectSingleMeaning)newMeaning); } } return(error); }
public IndirectSingleMeaning(DirectSingleMeaning directMeaning) { this.directMeaning = directMeaning; }