It's awesome to see NativeAOT support landing in .NET 7. That will be a big win for those who want to use NativeAOT for smaller binaries and faster startup time. This Twitter thread from David Fowler does a good job of summarizing the pros and cons of NativeAOT:
.Net source generators can't modify existing code, they can only add additional code files, so your first example wouldn't be able to be rewritten by the source generator.
4 comments
[ 0.23 ms ] story [ 21.8 ms ] threadhttps://twitter.com/davidfowl/status/1391580410119819265
You can read the development discussion and syntax reasoning in the GitHub issue: https://github.com/dotnet/runtime/issues/44676