diff --git a/src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs b/src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs
index 2e016c91b009631ed2c0d26bdcc05de02c2f60c9..f5346ce33ee5c887e1f9be19a9e244c0a5f20328 100644
--- a/src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs
+++ b/src/Compilers/CSharp/Portable/Compilation/CSharpSemanticModel.cs
@@ -2716,9 +2716,9 @@ internal Conversion ClassifyConversionForCast(int position, ExpressionSyntax exp
public abstract ISymbol GetDeclaredSymbol(VariableDeclaratorSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
///
- /// Given an identifier declared in a deconstruction declaration, get the corresponding local variable symbol.
+ /// Given a variable designation syntax, get the corresponding symbol.
///
- /// The syntax node that declares a variable in a deconstruction.
+ /// The syntax node that declares a variable.
/// The cancellation token.
/// The symbol that was declared.
public abstract ISymbol GetDeclaredSymbol(SingleVariableDesignationSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
@@ -2731,14 +2731,6 @@ internal Conversion ClassifyConversionForCast(int position, ExpressionSyntax exp
/// The symbol that was declared.
public abstract ILocalSymbol GetDeclaredSymbol(DeclarationPatternSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
- ///
- /// Given an out variable declaration expression, get the corresponding symbol.
- ///
- /// The syntax node that declares a variable.
- /// The cancellation token.
- /// The symbol that was declared.
- public abstract ILocalSymbol GetDeclaredSymbol(DeclarationExpressionSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken));
-
///
/// Given a labeled statement syntax, get the corresponding label symbol.
///
@@ -4635,8 +4627,6 @@ protected sealed override ISymbol GetDeclaredSymbolCore(SyntaxNode declaration,
return this.GetDeclaredSymbol((SingleVariableDesignationSyntax)node, cancellationToken);
case SyntaxKind.DeclarationPattern:
return this.GetDeclaredSymbol((DeclarationPatternSyntax)node, cancellationToken);
- case SyntaxKind.DeclarationExpression:
- return this.GetDeclaredSymbol((DeclarationExpressionSyntax)node, cancellationToken);
case SyntaxKind.NamespaceDeclaration:
return this.GetDeclaredSymbol((NamespaceDeclarationSyntax)node, cancellationToken);
case SyntaxKind.Parameter:
diff --git a/src/Compilers/CSharp/Portable/Compilation/MemberSemanticModel.cs b/src/Compilers/CSharp/Portable/Compilation/MemberSemanticModel.cs
index 46b71b3e50524ca5fce461302e6d4eaf3c9bcb48..0f944c092df292702c25ee2e887319ca322c3296 100644
--- a/src/Compilers/CSharp/Portable/Compilation/MemberSemanticModel.cs
+++ b/src/Compilers/CSharp/Portable/Compilation/MemberSemanticModel.cs
@@ -597,12 +597,6 @@ public override ILocalSymbol GetDeclaredSymbol(DeclarationPatternSyntax declarat
return GetDeclaredLocal(declarationSyntax, declarationSyntax.Identifier);
}
- public override ILocalSymbol GetDeclaredSymbol(DeclarationExpressionSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
- {
- CheckSyntaxNode(declarationSyntax);
- return GetDeclaredLocal(declarationSyntax, declarationSyntax.Identifier());
- }
-
public override ILabelSymbol GetDeclaredSymbol(LabeledStatementSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
{
CheckSyntaxNode(declarationSyntax);
diff --git a/src/Compilers/CSharp/Portable/Compilation/SyntaxTreeSemanticModel.cs b/src/Compilers/CSharp/Portable/Compilation/SyntaxTreeSemanticModel.cs
index f7bee8b513bb56839420d9d4713218e223d2e9f6..b5aca88d66a8e12cde80a530da02c4ef3d838f94 100644
--- a/src/Compilers/CSharp/Portable/Compilation/SyntaxTreeSemanticModel.cs
+++ b/src/Compilers/CSharp/Portable/Compilation/SyntaxTreeSemanticModel.cs
@@ -1662,18 +1662,6 @@ public override ILocalSymbol GetDeclaredSymbol(DeclarationPatternSyntax declarat
return memberModel == null ? null : memberModel.GetDeclaredSymbol(declarationSyntax, cancellationToken);
}
- ///
- /// Given an out variable declaration expression syntax, get the corresponding symbol.
- ///
- /// The syntax node that declares a variable.
- /// The cancellation token.
- /// The symbol that was declared.
- public override ILocalSymbol GetDeclaredSymbol(DeclarationExpressionSyntax declarationSyntax, CancellationToken cancellationToken = default(CancellationToken))
- {
- var memberModel = this.GetMemberModel(declarationSyntax);
- return memberModel == null ? null : memberModel.GetDeclaredSymbol(declarationSyntax, cancellationToken);
- }
-
///
/// Given a labeled statement syntax, get the corresponding label symbol.
///
diff --git a/src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs b/src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs
index 416e8790cb81a3862aab930b68006b689f3f54ba..7de4754a0a5f1b969cb18ff27a411655a3b9a8a2 100644
--- a/src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs
+++ b/src/Compilers/CSharp/Test/Semantic/Semantics/OutVarTests.cs
@@ -173,7 +173,7 @@ private static void VerifyModelForOutVar(SemanticModel model, DeclarationExpress
Assert.Same(symbol, model.GetSymbolInfo(decl).Symbol);
Assert.Equal(local.Type, model.GetTypeInfo(decl).Type);
- Assert.Same(symbol, model.GetDeclaredSymbol(decl));
+ Assert.Null(model.GetDeclaredSymbol(decl));
foreach (var reference in references)
{