Hitting this with native AOT, only when optimizations are disabled (/p:Optimize=false).
Repro steps:
- Add:
<PropertyGroup>
<Features>$(Features);runtime-async=on</Features>
<NoWarn>$(NoWarn);xUnit1013;CS1998;SYSLIB5007</NoWarn>
</PropertyGroup>>
At the bottom of src\libraries\Directory.Build.props.
build.cmd clr.aot+libs -rc Checked -lc Release
dotnet.cmd build src\libraries\System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.4.Tests.csproj -c Release /p:RuntimeConfiguration=Checked /p:TestNativeAot=true /p:Optimize=false -f net11.0
Hitting:
ILC: D:\git\runtime3\src\coreclr\jit\lower.cpp:5930
ILC: Assertion failed 'node->AsCall()->IsAsync()' in 'System.Text.Json.Serialization.Tests.StreamingJsonSerializerWrapper:DeserializeWrapper[System.Text.Json.Serialization.Tests.Struct_With_Ctor_With_65_Params](System.String,System.Text.Json.JsonSerializerOptions):System.Threading.Tasks.Task`1[System.Text.Json.Serialization.Tests.Struct_With_Ctor_With_65_Params]:this' during 'Lowering nodeinfo' (IL size 76; hash 0x61a38a3d; MinOpts)
Hitting this with native AOT, only when optimizations are disabled (
/p:Optimize=false).Repro steps:
At the bottom of src\libraries\Directory.Build.props.
build.cmd clr.aot+libs -rc Checked -lc Releasedotnet.cmd build src\libraries\System.Text.Json\tests\System.Text.Json.SourceGeneration.Tests\System.Text.Json.SourceGeneration.Roslyn4.4.Tests.csproj -c Release /p:RuntimeConfiguration=Checked /p:TestNativeAot=true /p:Optimize=false -f net11.0Hitting: