diff --git a/src/Workspaces/Core/Portable/Shared/Extensions/ICodeDefinitionFactoryExtensions.cs b/src/Workspaces/Core/Portable/Shared/Extensions/ICodeDefinitionFactoryExtensions.cs index 93182e76315273b0892e0b722b2710667a4dc23a..01d98bbf46f185e0a64402eb913749d24c6d7065 100644 --- a/src/Workspaces/Core/Portable/Shared/Extensions/ICodeDefinitionFactoryExtensions.cs +++ b/src/Workspaces/Core/Portable/Shared/Extensions/ICodeDefinitionFactoryExtensions.cs @@ -1,6 +1,5 @@ // Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. -using System; using System.Collections.Generic; using System.Collections.Immutable; using System.Linq; @@ -8,7 +7,6 @@ using System.Threading.Tasks; using Microsoft.CodeAnalysis.CodeGeneration; using Microsoft.CodeAnalysis.Editing; -using Microsoft.CodeAnalysis.ErrorReporting; using Microsoft.CodeAnalysis.FindSymbols; using Microsoft.CodeAnalysis.Simplification; using Roslyn.Utilities; @@ -59,7 +57,7 @@ internal static partial class ICodeDefinitionFactoryExtensions typeName: typeName, parameters: constructor.Parameters, statements: default(ImmutableArray), - baseConstructorArguments: constructor.Parameters.Length == 0 + baseConstructorArguments: constructor.Parameters.Length == 0 ? default(ImmutableArray) : factory.CreateArguments(constructor.Parameters)); } @@ -234,7 +232,7 @@ private static bool TryGetValue(IDictionary dictionary, string // Indexer: return or set base[]. Only in C#, since VB must refer to these by name. getBody = codeFactory.ReturnStatement( - WrapWithRefIfNecessary(codeFactory, overriddenProperty, + WrapWithRefIfNecessary(codeFactory, overriddenProperty, codeFactory.ElementAccessExpression( codeFactory.BaseExpression(), codeFactory.CreateArguments(overriddenProperty.Parameters)))); @@ -277,7 +275,7 @@ private static bool TryGetValue(IDictionary dictionary, string else { getBody = codeFactory.ReturnStatement( - WrapWithRefIfNecessary(codeFactory, overriddenProperty, + WrapWithRefIfNecessary(codeFactory, overriddenProperty, codeFactory.InvocationExpression( codeFactory.MemberAccessExpression( codeFactory.BaseExpression(), @@ -446,4 +444,4 @@ private static DeclarationModifiers GetOverrideModifiers(ISymbol symbol) } } } -} +} \ No newline at end of file