Closed LanceXact closed 11 months ago
Hello @LanceXact, thank you for submitting this issue. We will try to get back to you as soon as possible. Note to the PostSharp team, this ticket is being tracked in our dashboard under ID TP-33922.
We have reproduced the issue on our side.
The underlying API that [IntroduceDependency]
uses currently does not support records, but you should get a more user-friendly error rather than this exception.
We will be working on improving this. Thanks a lot for the report.
This bug has been fixed in Metalama 2024.0.3-preview.
The IntroduceDependencyAttribute used within the SimpleLogAttribute to inject an ILogger _logger isn't working on record types at compile-time. I'm getting this error:
Here's the offending record type (I created a tiny reproducible version):