Skip to content

Commit

Permalink
Add broken code
Browse files Browse the repository at this point in the history
Add example controller code from #3013.
  • Loading branch information
martincostello committed Aug 17, 2024
1 parent 00396f4 commit 5d2e186
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/WebSites/Basic/Controllers/Issue3013Controller.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#if NET6_0_OR_GREATER
using Microsoft.AspNetCore.Mvc;

namespace Basic.Controllers;

[ApiController]
[Route("[controller]/[action]")]
public class Issue3013Controller : ControllerBase
{
[HttpGet]
public TestResponse Get()
{
return new()
{
Foo = new(1, 2),
};
}

public record TestResponse
{
public TestStruct? Foo { get; init; }
}

public record struct TestStruct(int A, int B);
}
#endif

0 comments on commit 5d2e186

Please sign in to comment.