Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Roslyn for Preview 7 #1533

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ All changes to the project will be documented in this file.
}
```
* Fixed a regression on declaration name completion (PR: [#1520](https://github.com/OmniSharp/omnisharp-roslyn/pull/1520))
* Update to Roslyn `3.2.0-beta4-19319-04` (PR: [#1527](https://github.com/OmniSharp/omnisharp-roslyn/pull/1527))
* Update to Roslyn `3.2.0-beta4-19326-12` (PR: [#1527](https://github.com/OmniSharp/omnisharp-roslyn/pull/1533))
* Added snippets support in LSP mode (PR: [#1422](https://github.com/OmniSharp/omnisharp-roslyn/pull/1422))
* Fixed renaming in LSP mode (PR: [#1423](https://github.com/OmniSharp/omnisharp-roslyn/pull/1423))

Expand Down
2 changes: 1 addition & 1 deletion build/Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<PropertyGroup>
<MSBuildPackageVersion>16.0.461</MSBuildPackageVersion>
<NuGetPackageVersion>5.0.0</NuGetPackageVersion>
<RoslynPackageVersion>3.2.0-beta4-19319-04</RoslynPackageVersion>
<RoslynPackageVersion>3.2.0-beta4-19326-12</RoslynPackageVersion>
<XunitPackageVersion>2.4.0</XunitPackageVersion>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ private void RenderMethodSymbol(IMethodSymbol methodSymbol)
_sb.Append(arg);
RenderSnippetEndMarker();

if (arg != last)
if (!Equals(arg, last))
{
_sb.Append(", ");
}
Expand Down Expand Up @@ -107,7 +107,7 @@ private void RenderParameters(IMethodSymbol methodSymbol)
_sb.Append(parameter.ToDisplayString(_format));
RenderSnippetEndMarker();

if (parameter != last)
if (!Equals(parameter, last))
{
_sb.Append(", ");
}
Expand All @@ -127,7 +127,7 @@ private IEnumerable<ISymbol> NonInferredTypeArguments(IMethodSymbol methodSymbol
{
var arg = typeArguments[i];
var param = typeParameters[i];
if (arg == param)
if (Equals(arg, param))
{
// this type parameter has not been resolved
nonInferredTypeArguments.Add(arg);
Expand Down
2 changes: 1 addition & 1 deletion src/OmniSharp.Roslyn/Extensions/SymbolExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ internal static INamedTypeSymbol GetTopLevelContainingNamedType(this ISymbol sym
{
// Traverse up until we find a named type that is parented by the namespace
var topLevelNamedType = symbol;
while (topLevelNamedType.ContainingSymbol != symbol.ContainingNamespace ||
while (!Equals(topLevelNamedType.ContainingSymbol, symbol.ContainingNamespace) ||
topLevelNamedType.Kind != SymbolKind.NamedType)
{
topLevelNamedType = topLevelNamedType.ContainingSymbol;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ public override ImmutableArray<DiagnosticDescriptor> SupportedDiagnostics

public override void Initialize(AnalysisContext context)
{
context.ConfigureGeneratedCodeAnalysis(GeneratedCodeAnalysisFlags.Analyze | GeneratedCodeAnalysisFlags.ReportDiagnostics);
context.EnableConcurrentExecution();
context.RegisterSymbolAction(AnalyzeSymbol, SymbolKind.NamedType);
}

Expand Down