Skip to content

Commit

Permalink
[main] Update dependencies from dotnet/roslyn (#98559)
Browse files Browse the repository at this point in the history
* Update dependencies from https://github.com/dotnet/roslyn build 20240215.8

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24115.8

* Update dependencies from https://github.com/dotnet/roslyn build 20240216.4

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24116.4

* Update dependencies from https://github.com/dotnet/roslyn build 20240216.4

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24116.4

* Update dependencies from https://github.com/dotnet/roslyn build 20240216.4

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24116.4

* Update dependencies from https://github.com/dotnet/roslyn build 20240220.1

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24120.1

* Update dependencies from https://github.com/dotnet/roslyn build 20240221.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24121.2

* Update dependencies from https://github.com/dotnet/roslyn build 20240221.4

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24121.4

* Update dependencies from https://github.com/dotnet/roslyn build 20240222.5

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24122.5

* Update dependencies from https://github.com/dotnet/roslyn build 20240223.6

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24123.6

* Update dependencies from https://github.com/dotnet/roslyn build 20240224.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24124.2

* Update dependencies from https://github.com/dotnet/roslyn build 20240222.4

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24122.4

* Avoid/suppress Lock-to-object conversion warnings

* Update dependencies from https://github.com/dotnet/roslyn build 20240227.1

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-2.24127.1

* Update dependencies from https://github.com/dotnet/roslyn build 20240227.10

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24127.10

* Update dependencies from https://github.com/dotnet/roslyn build 20240228.4

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24128.4

* Update dependencies from https://github.com/dotnet/roslyn build 20240301.3

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24151.3

* Update dependencies from https://github.com/dotnet/roslyn build 20240301.8

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24151.8

* Update dependencies from https://github.com/dotnet/roslyn build 20240301.8

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24151.8

* Update dependencies from https://github.com/dotnet/roslyn build 20240301.8

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24151.8

* Update dependencies from https://github.com/dotnet/roslyn build 20240305.1

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24155.1

* Update dependencies from https://github.com/dotnet/roslyn build 20240305.13

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24155.13

* Suppress more Lock-to-object warnings

* Remove invalid source build element

* Update dependencies from https://github.com/dotnet/roslyn build 20240306.11

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24156.11

* Update dependencies from https://github.com/dotnet/roslyn build 20240307.14

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24157.14

* Update dependencies from https://github.com/dotnet/roslyn build 20240308.5

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24158.5

* Update dependencies from https://github.com/dotnet/roslyn build 20240308.5

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24158.5

* Update dependencies from https://github.com/dotnet/roslyn build 20240311.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24161.2

* Update dependencies from https://github.com/dotnet/roslyn build 20240311.10

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24161.10

* Update dependencies from https://github.com/dotnet/roslyn build

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24172.1

* Update dependencies from https://github.com/dotnet/roslyn build

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24175.2

* Workaround compiler changes related to dynamic

* Work around Microsoft.CSharp test failure due to dynamic changes

* Update dependencies from https://github.com/dotnet/roslyn build

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.11.0-1.24176.2

* Update dependencies from https://github.com/dotnet/roslyn build 20240330.2

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.11.0-1.24180.2

* Convert ParallelTheory to Theory in InteropService test suites.

The ParallelTheory creates an environment that overwhelms the
GC and Finalizer thread on x86. The result is OOMs in the 32-bit
memory address space.

* Fix deadlocking in regex tests

* Update dependencies from https://github.com/dotnet/roslyn build 20240402.15

Microsoft.SourceBuild.Intermediate.roslyn , Microsoft.CodeAnalysis , Microsoft.CodeAnalysis.CSharp , Microsoft.Net.Compilers.Toolset
 From Version 4.10.0-2.24114.13 -> To Version 4.10.0-3.24202.15

* Fix wasm

* Comment out test for InvokeConstructor

Roslyn no longer generates a call to InvokeConstructor.

---------

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
Co-authored-by: Larry Ewing <lewing@microsoft.com>
Co-authored-by: Jan Jones <janjones@microsoft.com>
Co-authored-by: Pavel Savara <pavel.savara@gmail.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Aaron R Robinson <arobins@microsoft.com>
Co-authored-by: Sven Boemer <sbomer@gmail.com>
  • Loading branch information
8 people committed Apr 5, 2024
1 parent 960849b commit d86b84f
Show file tree
Hide file tree
Showing 23 changed files with 109 additions and 59 deletions.
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -360,17 +360,17 @@
<Uri>https://github.com/dotnet/runtime-assets</Uri>
<Sha>f282faa0ddd1b3672a3cba54518943fb1d0b4e36</Sha>
</Dependency>
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.10.0-2.24114.13">
<Dependency Name="Microsoft.Net.Compilers.Toolset" Version="4.10.0-3.24202.15">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>77372c66fd54927312b5b0a2e399e192f74445c9</Sha>
<Sha>cbca41cad4e21c29548e9e57d7135740b6f78df9</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis" Version="4.10.0-2.24114.13">
<Dependency Name="Microsoft.CodeAnalysis" Version="4.10.0-3.24202.15">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>77372c66fd54927312b5b0a2e399e192f74445c9</Sha>
<Sha>cbca41cad4e21c29548e9e57d7135740b6f78df9</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.10.0-2.24114.13">
<Dependency Name="Microsoft.CodeAnalysis.CSharp" Version="4.10.0-3.24202.15">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>77372c66fd54927312b5b0a2e399e192f74445c9</Sha>
<Sha>cbca41cad4e21c29548e9e57d7135740b6f78df9</Sha>
</Dependency>
<Dependency Name="Microsoft.CodeAnalysis.Analyzers" Version="3.11.0-beta1.24177.1">
<Uri>https://github.com/dotnet/roslyn-analyzers</Uri>
Expand All @@ -381,9 +381,9 @@
<Sha>ad732e236e7ffcb66de4b45a1b736aad4ccdcd83</Sha>
</Dependency>
<!-- Intermediate is necessary for source build. -->
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.10.0-2.24114.13">
<Dependency Name="Microsoft.SourceBuild.Intermediate.roslyn" Version="4.10.0-3.24202.15">
<Uri>https://github.com/dotnet/roslyn</Uri>
<Sha>77372c66fd54927312b5b0a2e399e192f74445c9</Sha>
<Sha>cbca41cad4e21c29548e9e57d7135740b6f78df9</Sha>
<SourceBuild RepoName="roslyn" ManagedOnly="true" />
</Dependency>
<Dependency Name="Microsoft.DotNet.ApiCompat.Task" Version="9.0.100-preview.4.24175.4">
Expand Down
6 changes: 3 additions & 3 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@
Any tools that contribute to the design-time experience should use the MicrosoftCodeAnalysisVersion_LatestVS property above to ensure
they do not break the local dev experience.
-->
<MicrosoftCodeAnalysisCSharpVersion>4.10.0-2.24114.13</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisVersion>4.10.0-2.24114.13</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.10.0-2.24114.13</MicrosoftNetCompilersToolsetVersion>
<MicrosoftCodeAnalysisCSharpVersion>4.10.0-3.24202.15</MicrosoftCodeAnalysisCSharpVersion>
<MicrosoftCodeAnalysisVersion>4.10.0-3.24202.15</MicrosoftCodeAnalysisVersion>
<MicrosoftNetCompilersToolsetVersion>4.10.0-3.24202.15</MicrosoftNetCompilersToolsetVersion>
</PropertyGroup>
<!--
For source generator support we need to target multiple versions of Roslyn in order to be able to run on older versions of Roslyn.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,9 @@ private unsafe void RemoveWaiter(Waiter waiter)

public Condition(Lock @lock)
{
#pragma warning disable CS9216 // A value of type 'System.Threading.Lock' converted to a different type will use likely unintended monitor-based locking in 'lock' statement.
ArgumentNullException.ThrowIfNull(@lock);
#pragma warning restore CS9216
_lock = @lock;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public static unsafe int AssignEntry(object obj, int* pHeader)

// Found a free entry to assign
Debug.Assert(!entry.Owner.IsAllocated);
Debug.Assert(entry.Lock == null);
Debug.Assert(entry.Lock is null);
Debug.Assert(entry.HashCode == 0);

// Set up the new entry. We should not fail after this point.
Expand Down
4 changes: 4 additions & 0 deletions src/libraries/Microsoft.CSharp/tests/BindingErrors.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ public void DoSomething(double d)
{
}

public void DoSomething(float d)
{
}

public static void DoSomething(int i)
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,12 @@ private void ContentionLockCreated(nint LockID, nint AssociatedObjectID, ushort

[NonEvent]
[MethodImpl(MethodImplOptions.NoInlining)]
public void ContentionLockCreated(Lock lockObj) => ContentionLockCreated(lockObj.LockIdForEvents, ObjectIDForEvents(lockObj));
public void ContentionLockCreated(Lock lockObj) =>
ContentionLockCreated(
lockObj.LockIdForEvents,
#pragma warning disable CS9216 // A value of type 'System.Threading.Lock' converted to a different type will use likely unintended monitor-based locking in 'lock' statement.
ObjectIDForEvents(lockObj));
#pragma warning restore CS9216

[Event(81, Level = EventLevel.Informational, Message = Messages.ContentionStart, Task = Tasks.Contention, Opcode = EventOpcode.Start, Version = 2, Keywords = Keywords.ContentionKeyword)]
private void ContentionStart(
Expand All @@ -115,7 +120,9 @@ public void ContentionStart(Lock lockObj) =>
ContentionFlagsMap.Managed,
DefaultClrInstanceId,
lockObj.LockIdForEvents,
#pragma warning disable CS9216 // A value of type 'System.Threading.Lock' converted to a different type will use likely unintended monitor-based locking in 'lock' statement.
ObjectIDForEvents(lockObj),
#pragma warning restore CS9216
lockObj.OwningThreadId);

[Event(91, Level = EventLevel.Informational, Message = Messages.ContentionStop, Task = Tasks.Contention, Opcode = EventOpcode.Stop, Version = 1, Keywords = Keywords.ContentionKeyword)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,12 @@ private unsafe void ContentionLockCreated(nint LockID, nint AssociatedObjectID,

[NonEvent]
[MethodImpl(MethodImplOptions.NoInlining)]
public void ContentionLockCreated(Lock lockObj) => ContentionLockCreated(lockObj.LockIdForEvents, ObjectIDForEvents(lockObj));
public void ContentionLockCreated(Lock lockObj) =>
ContentionLockCreated(
lockObj.LockIdForEvents,
#pragma warning disable CS9216 // A value of type 'System.Threading.Lock' converted to a different type will use likely unintended monitor-based locking in 'lock' statement.
ObjectIDForEvents(lockObj));
#pragma warning restore CS9216

[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:UnrecognizedReflectionPattern", Justification = "Parameters to this method are primitive and are trimmer safe")]
[Event(81, Level = EventLevel.Informational, Message = Messages.ContentionStart, Task = Tasks.Contention, Opcode = EventOpcode.Start, Version = 2, Keywords = Keywords.ContentionKeyword)]
Expand Down Expand Up @@ -146,7 +151,9 @@ public void ContentionStart(Lock lockObj) =>
ContentionFlagsMap.Managed,
DefaultClrInstanceId,
lockObj.LockIdForEvents,
#pragma warning disable CS9216 // A value of type 'System.Threading.Lock' converted to a different type will use likely unintended monitor-based locking in 'lock' statement.
ObjectIDForEvents(lockObj),
#pragma warning restore CS9216
lockObj.OwningThreadId);

[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2026:UnrecognizedReflectionPattern", Justification = "Parameters to this method are primitive and are trimmer safe")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ internal Scope(Lock lockObj, ThreadId currentThreadId)
public void Dispose()
{
Lock? lockObj = _lockObj;
if (lockObj != null)
if (lockObj is not null)
{
_lockObj = null;
lockObj.Exit(_currentThreadId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public static IEnumerable<object[]> ComInterfaceGeneratorSnippetsToCompile()
} };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(ComInterfaceGeneratorSnippetsToCompile))]
public async Task ValidateComInterfaceGeneratorSnippets(string id, string source, DiagnosticResult[] expectedDiagnostics)
{
Expand Down Expand Up @@ -335,7 +335,7 @@ public static IEnumerable<object[]> InvalidManagedToUnmanagedCodeSnippetsToCompi
yield return new[] { ID(), customStructMarshallingCodeSnippets.Stateful.ByValueOutParameter };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(InvalidUnmanagedToManagedCodeSnippetsToCompile), GeneratorKind.ComInterfaceGenerator)]
public async Task ValidateInvalidUnmanagedToManagedCodeSnippets(string id, string source, DiagnosticResult[] expectedDiagnostics)
{
Expand All @@ -349,7 +349,7 @@ public async Task ValidateInvalidUnmanagedToManagedCodeSnippets(string id, strin
await test.RunAsync();
}

[ParallelTheory]
[Theory]
[MemberData(nameof(InvalidManagedToUnmanagedCodeSnippetsToCompile), GeneratorKind.ComInterfaceGenerator)]
public async Task ValidateInvalidManagedToUnmanagedCodeSnippets(string id, string source)
{
Expand All @@ -361,7 +361,7 @@ public async Task ValidateInvalidManagedToUnmanagedCodeSnippets(string id, strin
await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, expectedDiagnostic);
}

[ParallelTheory]
[Theory]
[MemberData(nameof(StringMarshallingCodeSnippets), GeneratorKind.ComInterfaceGenerator)]
public async Task ValidateStringMarshallingDiagnostics(string id, string source, DiagnosticResult[] expectedDiagnostics)
{
Expand Down Expand Up @@ -512,15 +512,15 @@ public static unsafe partial class Test {
}
}

[ParallelTheory]
[Theory]
[MemberData(nameof(StringMarshallingCustomTypeVisibilities))]
public async Task VerifyStringMarshallingCustomTypeWithLessVisibilityThanInterfaceWarns(string id, string source, DiagnosticResult[] diagnostics)
{
_ = id;
await VerifyComInterfaceGenerator.VerifySourceGeneratorAsync(source, diagnostics);
}

[ParallelTheory]
[Theory]
[MemberData(nameof(InterfaceVisibilities))]
public async Task VerifyInterfaceWithLessVisibilityThanInterfaceWarns(string id, string source, DiagnosticResult[] diagnostics)
{
Expand Down Expand Up @@ -772,7 +772,7 @@ string Source(
}
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CountParameterIsOutSnippets))]
public async Task ValidateSizeParameterRefKindDiagnostics(string ID, string source, params DiagnosticResult[] diagnostics)
{
Expand Down Expand Up @@ -889,7 +889,7 @@ partial interface I
}
}

[ParallelTheory]
[Theory]
[MemberData(nameof(IntAndEnumReturnTypeSnippets))]
public async Task ValidateReturnTypeInfoDiagnostics(string id, string source, DiagnosticResult[] diagnostics)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ public static IEnumerable<object[]> CustomCollectionsManagedToUnmanaged(Generato
yield return new[] { ID(), customCollectionMarshallingCodeSnippetsManagedToUnmanaged.Stateful.NonBlittableElementNativeToManagedOnlyReturnValue };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToCompile), GeneratorKind.VTableIndexStubGenerator)]
[MemberData(nameof(ManagedToUnmanagedCodeSnippetsToCompile), GeneratorKind.VTableIndexStubGenerator)]
[MemberData(nameof(UnmanagedToManagedCodeSnippetsToCompile), GeneratorKind.VTableIndexStubGenerator)]
Expand Down Expand Up @@ -348,7 +348,7 @@ public static IEnumerable<object[]> ManagedToUnmanagedComInterfaceSnippetsToComp
yield return new[] { ID(), codeSnippets.MarshalAsParameterAndModifiers("object", System.Runtime.InteropServices.UnmanagedType.Struct) };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToCompile), GeneratorKind.ComInterfaceGenerator)]
[MemberData(nameof(CustomCollections), GeneratorKind.ComInterfaceGenerator)]
[MemberData(nameof(ManagedToUnmanagedCodeSnippetsToCompile), GeneratorKind.ComInterfaceGeneratorComObjectWrapper)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,7 @@ public static IEnumerable<object[]> CodeSnippetsToCompile()
} };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToCompile))]
public async Task ValidateSnippets(string id, string source, DiagnosticResult[] diagnostics)
{
Expand All @@ -804,7 +804,7 @@ public static IEnumerable<object[]> CodeSnippetsToCompile_InvalidCode()
yield return new[] { ID(), CodeSnippets.IncorrectAttributeFieldType };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToCompile_InvalidCode))]
public async Task ValidateSnippets_InvalidCodeGracefulFailure(string id, string source)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ public static IEnumerable<object[]> CustomCollections()
yield return new[] { ID(), CodeSnippets.CollectionsOfCollectionsStress };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToCompile))]
[MemberData(nameof(CustomCollections))]
public async Task ValidateSnippets(string id, string source)
Expand All @@ -461,7 +461,7 @@ public static IEnumerable<object[]> CodeSnippetsToCompileWithPreprocessorSymbols
yield return new object[] { ID(), CodeSnippets.PreprocessorIfAfterAttributeAroundFunctionAdditionalFunctionAfter("Foo"), new string[] { "Foo" } };
yield return new object[] { ID(), CodeSnippets.PreprocessorIfAfterAttributeAroundFunctionAdditionalFunctionAfter("Foo"), Array.Empty<string>() };
}
[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToCompileWithPreprocessorSymbols))]
public async Task ValidateSnippetsWithPreprocessorDefinitions(string id, string source, IEnumerable<string> preprocessorSymbols)
{
Expand Down Expand Up @@ -530,7 +530,7 @@ public static IEnumerable<object[]> CodeSnippetsToValidateFallbackForwarder()
}
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToValidateFallbackForwarder))]
[OuterLoop("Uses the network for downlevel ref packs")]
public async Task ValidateSnippetsFallbackForwarder(string id, string source, TestTargetFramework targetFramework, bool expectFallbackForwarder)
Expand Down Expand Up @@ -576,7 +576,7 @@ public static IEnumerable<object[]> FullyBlittableSnippetsToCompile()
yield return new[] { ID(), CodeSnippets.BasicParameterByValue("int") };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(FullyBlittableSnippetsToCompile))]
public async Task ValidateSnippetsWithBlittableAutoForwarding(string id, string source)
{
Expand Down Expand Up @@ -616,7 +616,7 @@ public static IEnumerable<object[]> SnippetsWithBlittableTypesButNonBlittableDat
yield return new[] { ID(), CodeSnippets.SetLastErrorTrue<int>() };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(SnippetsWithBlittableTypesButNonBlittableDataToCompile))]
public async Task ValidateSnippetsWithBlittableTypesButNonBlittableMetadataDoNotAutoForward(string id, string source)
{
Expand Down Expand Up @@ -689,7 +689,7 @@ public static IEnumerable<object[]> CodeSnippetsToCompileMultipleSources()
yield return new object[] { ID(), new[] { CodeSnippets.BasicParameterByValue("int[]", CodeSnippets.DisableRuntimeMarshalling), CodeSnippets.BasicParameterWithByRefModifier("ref", "int") } };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToCompileMultipleSources))]
public async Task ValidateSnippetsWithMultipleSources(string id, string[] sources)
{
Expand Down Expand Up @@ -717,7 +717,7 @@ public class Basic { }
yield return new object[] { ID(), source, TestTargetFramework.Net };
}

[ParallelTheory]
[Theory]
[MemberData(nameof(CodeSnippetsToVerifyNoTreesProduced))]
public async Task ValidateNoGeneratedOuptutForNoImport(string id, string source, TestTargetFramework framework)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4426,6 +4426,10 @@ public static void Foo(string x)
{
}

public static void Foo(int x)
{
}

public void Foo2()
{
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,14 @@ public class MyClass
return d;
}
}
public dynamic this[long x, dynamic d]
{
get
{
MyClass.Status = 2;
return d;
}
}
}

[Fact]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static IEnumerable<object[]> Test_MemberData()
foreach (RegexEngine engine in RegexHelpers.AvailableEngines)
{
(RegexOptions Options, string Pattern, string Input, string Expected)[] cases = Match_MemberData_Cases(engine).ToArray();
Regex[] regexes = RegexHelpers.GetRegexesAsync(engine, cases.Select(c => (c.Pattern, (CultureInfo?)null, (RegexOptions?)c.Options, (TimeSpan?)null)).ToArray()).Result;
Regex[] regexes = RegexHelpers.GetRegexes(engine, cases.Select(c => (c.Pattern, (CultureInfo?)null, (RegexOptions?)c.Options, (TimeSpan?)null)).ToArray());
for (int i = 0; i < regexes.Length; i++)
{
yield return new object[] { regexes[i], cases[i].Input, cases[i].Expected };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ public static IEnumerable<object[]> ValidateRegex_MemberData()
{
(string Pattern, RegexOptions Options, string Input, string Expected)[] allEngineCases = Cases(engine).ToArray();

Regex[] results = RegexHelpers.GetRegexesAsync(engine, allEngineCases.Select(c => (c.Pattern, (CultureInfo?)null, (RegexOptions?)c.Options, (TimeSpan?)null)).ToArray()).Result;
Regex[] results = RegexHelpers.GetRegexes(engine, allEngineCases.Select(c => (c.Pattern, (CultureInfo?)null, (RegexOptions?)c.Options, (TimeSpan?)null)).ToArray());
for (int i = 0; i < results.Length; i++)
{
string expected = allEngineCases[i].Expected;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static IEnumerable<object[]> Groups_MemberData()
foreach (RegexEngine engine in RegexHelpers.AvailableEngines)
{
(CultureInfo Culture, string Pattern, string Input, RegexOptions Options, string[] Expected)[] cases = Groups_MemberData_Cases(engine).ToArray();
Regex[] regexes = RegexHelpers.GetRegexesAsync(engine, cases.Select(c => (c.Pattern, c.Culture, (RegexOptions?)c.Options, (TimeSpan?)null)).ToArray()).Result;
Regex[] regexes = RegexHelpers.GetRegexes(engine, cases.Select(c => (c.Pattern, c.Culture, (RegexOptions?)c.Options, (TimeSpan?)null)).ToArray());
for (int i = 0; i < regexes.Length; i++)
{
yield return new object[] { regexes[i], cases[i].Culture, cases[i].Input, cases[i].Expected };
Expand Down
Loading

0 comments on commit d86b84f

Please sign in to comment.