未验证 提交 d3400922 编写于 作者: N Neal Gafter 提交者: GitHub

Clean up some dead comments. (#40661)

上级 e05ed137
......@@ -28,7 +28,7 @@ internal TypeofBinder(ExpressionSyntax typeExpression, Binder next)
OpenTypeVisitor.Visit(typeExpression, out _allowedMap, out _isTypeExpressionOpen);
}
internal bool IsTypeExpressionOpen { get { return _isTypeExpressionOpen; } }
internal bool IsTypeExpressionOpen => _isTypeExpressionOpen;
protected override bool IsUnboundTypeAllowed(GenericNameSyntax syntax)
{
......@@ -36,48 +36,6 @@ protected override bool IsUnboundTypeAllowed(GenericNameSyntax syntax)
return _allowedMap != null && _allowedMap.TryGetValue(syntax, out allowed) && allowed;
}
/////// <summary>
/////// Returns the list of the symbols which represent the argument of the nameof operator. Ambiguities are not an error for the nameof.
/////// </summary>
////internal ImmutableArray<Symbol> LookupForNameofArgument(ExpressionSyntax left, IdentifierNameSyntax right, string name, DiagnosticBag diagnostics, bool isAliasQualified, out bool hasErrors)
////{
//// ArrayBuilder<Symbol> symbols = ArrayBuilder<Symbol>.GetInstance();
//// Symbol container = null;
//// hasErrors = false;
//// // We treat the AliasQualified syntax different than the rest. We bind the whole part for the alias.
//// if (isAliasQualified)
//// {
//// container = BindNamespaceAliasSymbol((IdentifierNameSyntax)left, diagnostics);
//// var aliasSymbol = container as AliasSymbol;
//// if (aliasSymbol != null) container = aliasSymbol.Target;
//// if (container.Kind == SymbolKind.NamedType)
//// {
//// diagnostics.Add(ErrorCode.ERR_ColColWithTypeAlias, left.Location, left);
//// hasErrors = true;
//// return symbols.ToImmutableAndFree();
//// }
//// }
//// // If it isn't AliasQualified, we first bind the left part, and then bind the right part as a simple name.
//// else if (left != null)
//// {
//// // We use OriginalDefinition because of the unbound generic names such as List<>, Dictionary<,>.
//// container = BindNamespaceOrTypeSymbol(left, diagnostics, null, false).OriginalDefinition;
//// }
//// this.BindNonGenericSimpleName(right, diagnostics, null, false, (NamespaceOrTypeSymbol)container, isNameofArgument: true, symbols: symbols);
//// if (CheckUsedBeforeDeclarationIfLocal(symbols, right))
//// {
//// Error(diagnostics, ErrorCode.ERR_VariableUsedBeforeDeclaration, right, right);
//// hasErrors = true;
//// }
//// else if (symbols.Count == 0)
//// {
//// hasErrors = true;
//// }
//// return symbols.ToImmutableAndFree();
////}
/// <summary>
/// This visitor walks over a type expression looking for open types.
/// Open types are allowed if an only if:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册