title: dotnet 6 System.Text.Json Source Generation Delegate Type Error
body: <p>I have a class that contains a public Func property and a private readonly Action member variable. This class is included in the JsonSerializerContext class I'm implementing for source generation. When I build the project, the generated g.cs file throws a CS0149 error: Method name Expected.</p>
  <p>I've tried assigning a DoNothing method to these items but still run into the same issue. I've also tried removing the Func and Action types and used a delegate type instead and have the same problem. Overall, I don't want either of these properties to be serialized or deserialized anyways, but the source generator doesn't seem to care.</p>
  <p>Here are the declarations of the members:</p>
  <pre><code>[JsonIgnore] public Func&lt;ICanRenderTable, object&gt; SortingMethod { get; init; }
  private readonly Action&lt;IConvertible&gt; OnValueChangeCallback;
  </code></pre>
  <p>The error is this:
  <code>Error  CS0149  Method name expected    System.Text.Json.SourceGeneration\System.Text.Json.SourceGeneration.JsonSourceGenerator\BGCSourceGenerator.ActionIConvertible.g.cs  25</code></p>
  <p><code>Error  CS0149  Method name expected    System.Text.Json.SourceGeneration.JsonSourceGenerator\BGCSourceGenerator.FuncICanRenderTableObject.g.cs 25 </code></p>
  <p>If I remove the class from the source generator context I've created, then it compiles without issue. I haven't been able to find this issue specifically on either the SO or the issues board for the system.text.json repo. Any help is appreciated.</p>