未验证 提交 4d9190ea 编写于 作者: D dotnet-automerge-bot 提交者: GitHub

Merge pull request #38335 from dotnet/merges/release/dev16.3-to-release/dev16.3-vs-deps

Merge release/dev16.3 to release/dev16.3-vs-deps
......@@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Emit;
using Microsoft.CodeAnalysis.PooledObjects;
using Roslyn.Utilities;
......@@ -46,7 +47,7 @@ internal sealed class RetargetingMethodSymbol : WrappedMethodSymbol
private ImmutableArray<MethodSymbol> _lazyExplicitInterfaceImplementations;
private DiagnosticInfo _lazyUseSiteDiagnostic = CSDiagnosticInfo.EmptyErrorInfo; // Indicates unknown state.
private TypeWithAnnotations _lazyReturnType;
private TypeWithAnnotations.Boxed _lazyReturnType;
public RetargetingMethodSymbol(RetargetingModuleSymbol retargetingModule, MethodSymbol underlyingMethod)
{
......@@ -130,11 +131,13 @@ public override TypeWithAnnotations ReturnTypeWithAnnotations
{
get
{
if (_lazyReturnType.IsDefault)
if (_lazyReturnType is null)
{
_lazyReturnType = this.RetargetingTranslator.Retarget(_underlyingMethod.ReturnTypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode, this.ContainingType);
Interlocked.CompareExchange(ref _lazyReturnType,
new TypeWithAnnotations.Boxed(this.RetargetingTranslator.Retarget(_underlyingMethod.ReturnTypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode, this.ContainingType)),
null);
}
return _lazyReturnType;
return _lazyReturnType.Value;
}
}
......
......@@ -4,6 +4,7 @@
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Diagnostics;
using System.Threading;
using Microsoft.CodeAnalysis.CSharp.Emit;
using Microsoft.CodeAnalysis.PooledObjects;
......@@ -28,7 +29,7 @@ internal sealed class RetargetingPropertySymbol : WrappedPropertySymbol
private DiagnosticInfo _lazyUseSiteDiagnostic = CSDiagnosticInfo.EmptyErrorInfo; // Indicates unknown state.
private TypeWithAnnotations _lazyType;
private TypeWithAnnotations.Boxed _lazyType;
public RetargetingPropertySymbol(RetargetingModuleSymbol retargetingModule, PropertySymbol underlyingProperty)
: base(underlyingProperty)
......@@ -59,16 +60,16 @@ public override TypeWithAnnotations TypeWithAnnotations
{
get
{
if (_lazyType.IsDefault)
if (_lazyType is null)
{
var type = this.RetargetingTranslator.Retarget(_underlyingProperty.TypeWithAnnotations, RetargetOptions.RetargetPrimitiveTypesByTypeCode);
if (type.Type.TryAsDynamicIfNoPia(this.ContainingType, out TypeSymbol asDynamic))
{
type = TypeWithAnnotations.Create(asDynamic);
}
_lazyType = type;
Interlocked.CompareExchange(ref _lazyType, new TypeWithAnnotations.Boxed(type), null);
}
return _lazyType;
return _lazyType.Value;
}
}
......
......@@ -25,7 +25,7 @@ internal sealed class LocalFunctionSymbol : SourceMethodSymbol
private bool _lazyIsVarArg;
// Initialized in two steps. Hold a copy if accessing during initialization.
private ImmutableArray<TypeParameterConstraintClause> _lazyTypeParameterConstraints;
private TypeWithAnnotations _lazyReturnType;
private TypeWithAnnotations.Boxed _lazyReturnType;
private TypeWithAnnotations.Boxed _lazyIteratorElementType;
// Lock for initializing lazy fields and registering their diagnostics
......@@ -202,7 +202,7 @@ public override TypeWithAnnotations ReturnTypeWithAnnotations
get
{
ComputeReturnType();
return _lazyReturnType;
return _lazyReturnType.Value;
}
}
......@@ -216,7 +216,7 @@ public override TypeWithAnnotations ReturnTypeWithAnnotations
internal void ComputeReturnType()
{
if (!_lazyReturnType.IsDefault)
if (_lazyReturnType is object)
{
return;
}
......@@ -270,14 +270,14 @@ internal void ComputeReturnType()
lock (_declarationDiagnostics)
{
if (!_lazyReturnType.IsDefault)
if (_lazyReturnType is object)
{
diagnostics.Free();
return;
}
_declarationDiagnostics.AddRangeAndFree(diagnostics);
_lazyReturnType = returnType;
Interlocked.CompareExchange(ref _lazyReturnType, new TypeWithAnnotations.Boxed(returnType), null);
}
}
......
......@@ -842,7 +842,7 @@ class Goo
End Using
End Function
<WpfFact>
<WpfFact(Skip:="https://github.com/dotnet/roslyn/issues/38247")>
<Trait(Traits.Feature, Traits.Features.Rename)>
Public Async Function VisualBasic_FixupSpanDuringResolvableConflict_ReferenceConflict() As Task
Using workspace = CreateWorkspaceWithWaiter(
......
......@@ -19,7 +19,7 @@ public CSharpQuickInfo(VisualStudioInstanceFactory instanceFactory, ITestOutputH
{
}
[WpfFact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/38301"), Trait(Traits.Feature, Traits.Features.QuickInfo)]
public void QuickInfo_MetadataDocumentation()
{
SetUpEditor(@"
......
......@@ -30,7 +30,7 @@ private void InvokeFix()
VisualStudio.Editor.Verify.CodeAction("Upgrade this project to C# language version 'latest'", applyFix: true);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.CodeActionsUpgradeProject)]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/38301"), Trait(Traits.Feature, Traits.Features.CodeActionsUpgradeProject)]
public void CPSProject_GeneralPropertyGroupUpdated()
{
var project = new ProjectUtils.Project(ProjectName);
......
......@@ -29,7 +29,7 @@ public override async Task InitializeAsync()
VisualStudio.Workspace.SetImportCompletionOption(false);
}
[WpfFact, Trait(Traits.Feature, Traits.Features.Completion)]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/38301"), Trait(Traits.Feature, Traits.Features.Completion)]
public void IntelliSenseTriggersOnParenWithBraceCompletionAndCorrectUndoMerging()
{
SetUpEditor(@"
......
......@@ -19,7 +19,7 @@ public BasicQuickInfo(VisualStudioInstanceFactory instanceFactory, ITestOutputHe
{
}
[WpfFact, Trait(Traits.Feature, Traits.Features.QuickInfo)]
[WpfFact(Skip = "https://github.com/dotnet/roslyn/issues/38301"), Trait(Traits.Feature, Traits.Features.QuickInfo)]
public void QuickInfo1()
{
SetUpEditor(@"
......
......@@ -1766,7 +1766,7 @@ public async Task TestParseOptions_CSharp_Compatibility_None()
await AssertCSParseOptionsAsync(CS.LanguageVersion.CSharp3, options => options.LanguageVersion);
}
[ConditionalFact(typeof(VisualStudioMSBuildInstalled)), Trait(Traits.Feature, Traits.Features.MSBuildWorkspace)]
[ConditionalFact(typeof(VisualStudioMSBuildInstalled), AlwaysSkip = "https://github.com/dotnet/roslyn/issues/38301"), Trait(Traits.Feature, Traits.Features.MSBuildWorkspace)]
public async Task TestParseOptions_CSharp_LanguageVersion_Default()
{
CreateCSharpFiles();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册