From 02f6ac87b4de671590297a3a1516b9122e399408 Mon Sep 17 00:00:00 2001 From: Cyrus Najmabadi Date: Tue, 14 Jul 2020 12:05:06 -0700 Subject: [PATCH] Fix --- .../SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs | 2 +- .../SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs | 4 ++-- .../Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs | 2 +- .../Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs | 4 ++-- .../Portable/SymbolKey/SymbolKey.EventSymbolKey.cs | 2 +- .../Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs | 2 +- .../Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs | 10 +++++----- .../Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs | 2 +- .../Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs | 4 ++-- .../Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs | 2 +- .../Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs | 2 +- .../SymbolKey/SymbolKey.PointerTypeSymbolKey.cs | 2 +- .../Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs | 2 +- .../Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs | 6 +++--- .../SymbolKey/SymbolKey.TypeParameterSymbolKey.cs | 4 ++-- 15 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs index 79d18d76924..b604c2b96ab 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousFunctionOrDelegateSymbolKey.cs @@ -37,7 +37,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var location = reader.ReadLocation(out var locationFailureReason); if (locationFailureReason != null) { - failureReason = $"({nameof(AnonymousFunctionOrDelegateSymbolKey)} {nameof(location)} failed -> ${locationFailureReason})"; + failureReason = $"({nameof(AnonymousFunctionOrDelegateSymbolKey)} {nameof(location)} failed -> {locationFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs index 90934603760..5dc2c8c987a 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.AnonymousTypeSymbolKey.cs @@ -33,7 +33,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var propertyTypes = reader.ReadSymbolKeyArray(out var propertyTypesFailureReason); if (propertyTypesFailureReason != null) { - failureReason = $"({nameof(AnonymousTypeSymbolKey)} {nameof(propertyTypes)} failed -> ${propertyTypesFailureReason})"; + failureReason = $"({nameof(AnonymousTypeSymbolKey)} {nameof(propertyTypes)} failed -> {propertyTypesFailureReason})"; return default; } @@ -42,7 +42,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var propertyLocations = reader.ReadLocationArray(out var propertyLocationsFailureReason); if (propertyLocationsFailureReason != null) { - failureReason = $"({nameof(AnonymousTypeSymbolKey)} {nameof(propertyLocations)} failed -> ${propertyLocationsFailureReason})"; + failureReason = $"({nameof(AnonymousTypeSymbolKey)} {nameof(propertyLocations)} failed -> {propertyLocationsFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs index 407a04e8755..a0b00707fcb 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.BodyLevelSymbolKey.cs @@ -125,7 +125,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string? fa var locations = reader.ReadLocationArray(out var locationsFailureReason); if (locationsFailureReason != null) { - failureReason = $"({nameof(BodyLevelSymbolKey)} {nameof(locations)} failed -> ${locationsFailureReason})"; + failureReason = $"({nameof(BodyLevelSymbolKey)} {nameof(locations)} failed -> {locationsFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs index a02d0c90f1b..1c0e3bfd027 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ErrorTypeSymbolKey.cs @@ -64,7 +64,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = ResolveContainer(reader, out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(ErrorTypeSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(ErrorTypeSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } @@ -73,7 +73,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var typeArguments = reader.ReadSymbolKeyArray(out var typeArgumentsFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(ErrorTypeSymbolKey)} {nameof(typeArguments)} failed -> ${typeArgumentsFailureReason})"; + failureReason = $"({nameof(ErrorTypeSymbolKey)} {nameof(typeArguments)} failed -> {typeArgumentsFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.EventSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.EventSymbolKey.cs index e437be63e6d..f2a018d5d40 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.EventSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.EventSymbolKey.cs @@ -20,7 +20,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingTypeResolution = reader.ReadSymbolKey(out var containingTypeFailureReason); if (containingTypeFailureReason != null) { - failureReason = $"({nameof(EventSymbolKey)} {nameof(containingTypeResolution)} failed -> ${containingTypeFailureReason})"; + failureReason = $"({nameof(EventSymbolKey)} {nameof(containingTypeResolution)} failed -> {containingTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs index 18a576f6220..71e024c6856 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.FieldSymbolKey.cs @@ -20,7 +20,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingTypeResolution = reader.ReadSymbolKey(out var containingTypeFailureReason); if (containingTypeFailureReason != null) { - failureReason = $"({nameof(FieldSymbolKey)} {nameof(containingTypeResolution)} failed -> ${containingTypeFailureReason})"; + failureReason = $"({nameof(FieldSymbolKey)} {nameof(containingTypeResolution)} failed -> {containingTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs index 61d8c185081..8563aec016a 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.MethodSymbolKey.cs @@ -23,14 +23,14 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var reducedFromResolution = reader.ReadSymbolKey(out var reducedFromFailureReason); if (reducedFromFailureReason != null) { - failureReason = $"({nameof(ReducedExtensionMethodSymbolKey)} {nameof(reducedFromResolution)} failed -> ${reducedFromFailureReason})"; + failureReason = $"({nameof(ReducedExtensionMethodSymbolKey)} {nameof(reducedFromResolution)} failed -> {reducedFromFailureReason})"; return default; } var receiverTypeResolution = reader.ReadSymbolKey(out var receiverTypeFailureReason); if (receiverTypeFailureReason != null) { - failureReason = $"({nameof(ReducedExtensionMethodSymbolKey)} {nameof(receiverTypeResolution)} failed -> ${receiverTypeFailureReason})"; + failureReason = $"({nameof(ReducedExtensionMethodSymbolKey)} {nameof(receiverTypeResolution)} failed -> {receiverTypeFailureReason})"; return default; } @@ -63,14 +63,14 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var constructedFrom = reader.ReadSymbolKey(out var constructedFromFailureReason); if (constructedFromFailureReason != null) { - failureReason = $"({nameof(ConstructedMethodSymbolKey)} {nameof(constructedFrom)} failed -> ${constructedFromFailureReason})"; + failureReason = $"({nameof(ConstructedMethodSymbolKey)} {nameof(constructedFrom)} failed -> {constructedFromFailureReason})"; return default; } using var typeArguments = reader.ReadSymbolKeyArray(out var typeArgumentsFailureReason); if (typeArgumentsFailureReason != null) { - failureReason = $"({nameof(ConstructedMethodSymbolKey)} {nameof(typeArguments)} failed -> ${typeArgumentsFailureReason})"; + failureReason = $"({nameof(ConstructedMethodSymbolKey)} {nameof(typeArguments)} failed -> {typeArgumentsFailureReason})"; return default; } @@ -139,7 +139,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingType = reader.ReadSymbolKey(out var containingTypeFailureReason); if (containingTypeFailureReason != null) { - failureReason = $"({nameof(MethodSymbolKey)} {nameof(containingType)} failed -> ${containingTypeFailureReason})"; + failureReason = $"({nameof(MethodSymbolKey)} {nameof(containingType)} failed -> {containingTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs index 25498f06767..9536b7a4635 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ModuleSymbolKey.cs @@ -16,7 +16,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(ModuleSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(ModuleSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs index c2d18e90b3e..8d6b929fcc2 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamedTypeSymbolKey.cs @@ -35,7 +35,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(NamedTypeSymbolKey)} {nameof(containingSymbolFailureReason)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(NamedTypeSymbolKey)} {nameof(containingSymbolFailureReason)} failed -> {containingSymbolFailureReason})"; return default; } @@ -44,7 +44,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var typeArguments = reader.ReadSymbolKeyArray(out var typeArgumentsFailureReason); if (typeArgumentsFailureReason != null) { - failureReason = $"({nameof(NamedTypeSymbolKey)} {nameof(typeArguments)} failed -> ${typeArgumentsFailureReason})"; + failureReason = $"({nameof(NamedTypeSymbolKey)} {nameof(typeArguments)} failed -> {typeArgumentsFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs index f273b6850b6..f3f3b8a0f4d 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.NamespaceSymbolKey.cs @@ -60,7 +60,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(EventSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(EventSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs index 6ce4777e63f..6a59071f132 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.ParameterSymbolKey.cs @@ -22,7 +22,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(ParameterSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(ParameterSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.PointerTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.PointerTypeSymbolKey.cs index f7141724828..56510893253 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.PointerTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.PointerTypeSymbolKey.cs @@ -16,7 +16,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var pointedAtTypeResolution = reader.ReadSymbolKey(out var pointedAtTypeFailureReason); if (pointedAtTypeFailureReason != null) { - failureReason = $"({nameof(PointerTypeSymbolKey)} {nameof(pointedAtTypeResolution)} failed -> ${pointedAtTypeFailureReason})"; + failureReason = $"({nameof(PointerTypeSymbolKey)} {nameof(pointedAtTypeResolution)} failed -> {pointedAtTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs index 259e5b3038d..b27a2ffec20 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.SymbolKeyReader.cs @@ -549,7 +549,7 @@ public Location ReadLocation(out string failureReason) var syntaxTree = GetSyntaxTree(filePath); if (syntaxTree != null) { - failureReason = $"{nameof(ReadLocation)} {nameof(SyntaxTree)} not found"; + failureReason = null; return Location.Create(syntaxTree, new TextSpan(start, length)); } } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs index a95426fb4cc..1093b5d7353 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TupleTypeSymbolKey.cs @@ -55,7 +55,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var elementLocations = ReadElementLocations(reader, out var elementLocationsFailureReason); if (elementLocationsFailureReason != null) { - failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(elementLocations)} failed -> ${elementLocationsFailureReason})"; + failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(elementLocations)} failed -> {elementLocationsFailureReason})"; return default; } @@ -65,7 +65,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai using var elementTypes = reader.ReadSymbolKeyArray(out var elementTypesFailureReason); if (elementTypesFailureReason != null) { - failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(elementTypes)} failed -> ${elementTypesFailureReason})"; + failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(elementTypes)} failed -> {elementTypesFailureReason})"; return default; } @@ -88,7 +88,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var underlyingTypeResolution = reader.ReadSymbolKey(out var underlyingTypeFailureReason); if (underlyingTypeFailureReason != null) { - failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(underlyingTypeResolution)} failed -> ${underlyingTypeFailureReason})"; + failureReason = $"({nameof(TupleTypeSymbolKey)} {nameof(underlyingTypeResolution)} failed -> {underlyingTypeFailureReason})"; return default; } diff --git a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TypeParameterSymbolKey.cs b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TypeParameterSymbolKey.cs index f8b0a3b19ab..67217f77a2f 100644 --- a/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TypeParameterSymbolKey.cs +++ b/src/Workspaces/Core/Portable/SymbolKey/SymbolKey.TypeParameterSymbolKey.cs @@ -34,7 +34,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var location = reader.ReadLocation(out var locationFailureReason); if (locationFailureReason != null) { - failureReason = $"({nameof(TypeParameterSymbolKey)} {nameof(location)} failed -> ${locationFailureReason})"; + failureReason = $"({nameof(TypeParameterSymbolKey)} {nameof(location)} failed -> {locationFailureReason})"; return default; } @@ -49,7 +49,7 @@ public static SymbolKeyResolution Resolve(SymbolKeyReader reader, out string fai var containingSymbolResolution = reader.ReadSymbolKey(out var containingSymbolFailureReason); if (containingSymbolFailureReason != null) { - failureReason = $"({nameof(TypeParameterSymbolKey)} {nameof(containingSymbolResolution)} failed -> ${containingSymbolFailureReason})"; + failureReason = $"({nameof(TypeParameterSymbolKey)} {nameof(containingSymbolResolution)} failed -> {containingSymbolFailureReason})"; return default; } -- GitLab