Skip to content

Commit 8c9f5c0

Browse files
committed
Enable async feature/tests
1 parent 29cd67f commit 8c9f5c0

File tree

5 files changed

+7
-16
lines changed

5 files changed

+7
-16
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 & 13 deletions
This file was deleted.

src/tests/async/small/small.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Project Sdk="Microsoft.NET.Sdk">
1+
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
33
<Optimize>True</Optimize>
44
</PropertyGroup>

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)