Skip to content

Commit 7967958

Browse files
committed
Enable async feature/tests
1 parent 3dd22a1 commit 7967958

File tree

4 files changed

+6
-7
lines changed

4 files changed

+6
-7
lines changed

src/coreclr/inc/clrconfigvalues.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -720,7 +720,7 @@ RETAIL_CONFIG_DWORD_INFO(EXTERNAL_EnableRiscV64Zbb, W("EnableRiscV64
720720
#endif
721721

722722
// Runtime-async
723-
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_RuntimeAsync, W("RuntimeAsync"), 0, "Enables runtime async method support")
723+
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_RuntimeAsync, W("RuntimeAsync"), 1, "Enables runtime async method support")
724724

725725
///
726726
/// Uncategorized

src/tests/async/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<PropertyGroup>
77
<RunAnalyzers>true</RunAnalyzers>
8-
<NoWarn>$(NoWarn);xUnit1013;CS1998</NoWarn>
8+
<NoWarn>$(NoWarn);xUnit1013;CS1998;SYSLIB5007</NoWarn>
99
<EnableNETAnalyzers>false</EnableNETAnalyzers>
1010
<Features>$(Features);runtime-async=on</Features>
1111
</PropertyGroup>

src/tests/async/Directory.Build.targets

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,5 @@
44
<DisableProjectBuild Condition="'$(RuntimeFlavor)' == 'mono' or '$(TestBuildMode)' == 'nativeaot' or '$(TargetArchitecture)' == 'wasm'">true</DisableProjectBuild>
55
</PropertyGroup>
66

7-
<PropertyGroup>
8-
<!-- runtime async testing in main repo NYI -->
9-
<DisableProjectBuild>true</DisableProjectBuild>
10-
</PropertyGroup>
11-
127
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.targets, $(MSBuildThisFileDirectory)..))" />
138
</Project>

src/tests/async/struct/struct.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ private struct S
4545

4646
public S(int value) => Value = value;
4747

48+
// Roslyn NYI - async in structs. Remove opt-out once supported.
49+
[System.Runtime.CompilerServices.RuntimeAsyncMethodGeneration(false)]
4850
public async Task Test()
4951
{
5052
// TODO: C# compiler is expected to do this, but not in the prototype.
@@ -59,6 +61,8 @@ public async Task Test()
5961
AssertEqual(102, @this.Value);
6062
}
6163

64+
// Roslyn NYI - async in structs. Remove opt-out once supported.
65+
[System.Runtime.CompilerServices.RuntimeAsyncMethodGeneration(false)]
6266
private async Task InstanceCall()
6367
{
6468
// TODO: C# compiler is expected to do this, but not in the prototype.

0 commit comments

Comments
 (0)