Skip to content

Commit

Permalink
Merge pull request #3343 from sharwell/update-compiler
Browse files Browse the repository at this point in the history
Update Microsoft.Net.Compilers to 3.5.0-beta4-20153-05
  • Loading branch information
sharwell authored Mar 4, 2020
2 parents 84449ea + ec4ed0d commit 6ca97fd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<!-- Roslyn -->
<MicrosoftCodeAnalysisVersion>3.0.0</MicrosoftCodeAnalysisVersion>
<MicrosoftCodeAnalysisForShippedApisVersion>3.5.0-beta2-20056-01</MicrosoftCodeAnalysisForShippedApisVersion>
<MicrosoftNetCompilersVersion>3.4.0-beta2-final</MicrosoftNetCompilersVersion>
<MicrosoftNetCompilersVersion>3.5.0-beta4-20153-05</MicrosoftNetCompilersVersion>
<DogfoodAnalyzersVersion>3.0.0-beta2.19529.2+e119d9cf</DogfoodAnalyzersVersion>
<MicrosoftCodeAnalysisBannedApiAnalyzersVersion>$(DogfoodAnalyzersVersion)</MicrosoftCodeAnalysisBannedApiAnalyzersVersion>
<MicrosoftCodeAnalysisFXCopAnalyersVersion>$(DogfoodAnalyzersVersion)</MicrosoftCodeAnalysisFXCopAnalyersVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ private static SymbolNamesWithValueOption<TValue> GetSymbolNamesWithValueOption<
Compilation compilation,
CancellationToken cancellationToken,
Func<string, SymbolNamesWithValueOption<TValue>.NameParts>? getTypeAndSuffixFunc = null)
where TValue : notnull
{
var analyzerConfigOptions = options.GetOrComputeCategorizedAnalyzerConfigOptions(cancellationToken);
return analyzerConfigOptions.GetOptionValue(optionName, rule, TryParse, defaultValue: SymbolNamesWithValueOption<TValue>.Empty);
Expand Down
3 changes: 2 additions & 1 deletion src/Utilities/Compiler/Options/SymbolNamesWithValueOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
namespace Analyzer.Utilities
{
internal sealed class SymbolNamesWithValueOption<TValue> : IEquatable<SymbolNamesWithValueOption<TValue>?>
where TValue : notnull
{
public static readonly SymbolNamesWithValueOption<TValue> Empty = new SymbolNamesWithValueOption<TValue>();

Expand Down Expand Up @@ -116,7 +117,7 @@ public bool Contains(ISymbol symbol)
/// <summary>
/// Gets the value associated with the specified symbol in the option specification.
/// </summary>
public bool TryGetValue(ISymbol symbol, [NotNullWhen(true)] out TValue value) =>
public bool TryGetValue(ISymbol symbol, [MaybeNullWhen(false)] out TValue value) =>
_symbols.TryGetValue(symbol, out value) || _names.TryGetValue(symbol.Name, out value);

public override bool Equals(object obj) => Equals(obj as SymbolNamesWithValueOption<TValue>);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ public bool TryGetOrComputeResult(
defaultDisposeOwnershipTransferAtConstructor: defaultDisposeOwnershipTransferAtConstructor);
if (disposeAnalysisResult != null)
{
RoslynDebug.Assert(pointsToAnalysisResult is object);
return true;
}
}
Expand Down

0 comments on commit 6ca97fd

Please sign in to comment.