From d340092275d80e3dd6e1021df1f0dfafcbfa92bd Mon Sep 17 00:00:00 2001 From: Neal Gafter Date: Tue, 31 Dec 2019 11:35:44 -0800 Subject: [PATCH] Clean up some dead comments. (#40661) --- .../CSharp/Portable/Binder/TypeofBinder.cs | 44 +------------------ 1 file changed, 1 insertion(+), 43 deletions(-) diff --git a/src/Compilers/CSharp/Portable/Binder/TypeofBinder.cs b/src/Compilers/CSharp/Portable/Binder/TypeofBinder.cs index 655cc6fdc36..0e6ef85fa67 100644 --- a/src/Compilers/CSharp/Portable/Binder/TypeofBinder.cs +++ b/src/Compilers/CSharp/Portable/Binder/TypeofBinder.cs @@ -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; } - /////// - /////// Returns the list of the symbols which represent the argument of the nameof operator. Ambiguities are not an error for the nameof. - /////// - ////internal ImmutableArray LookupForNameofArgument(ExpressionSyntax left, IdentifierNameSyntax right, string name, DiagnosticBag diagnostics, bool isAliasQualified, out bool hasErrors) - ////{ - //// ArrayBuilder symbols = ArrayBuilder.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(); - ////} - /// /// This visitor walks over a type expression looking for open types. /// Open types are allowed if an only if: -- GitLab