-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Closed
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzers
Milestone
Description
Description
Found this while testing the new upcoming release of the MVVM Toolkit. It seems the trim analyzer doesn't flag base constructors that are annotated with some trim annotation, so you only see the issue on publish, which of course is not ideal.
Reproduction Steps
B b = new(); // No warnings here either
abstract class A
{
[RequiresUnreferencedCode("blah")]
public A()
{
}
}
// No warnings here
class B : A
{
}
Expected behavior
Not sure if the warning should be on the B
declaration or on the new()
expression, but I assume it should be somewhere 😅
Actual behavior
No warnings at all from the analyzer.
Regression?
No, tried on both .NET 8 and .NET 9, same issue.
Configuration
- .NET 8.0.400
- .NET 9.0.100-preview.7.24407.12
Metadata
Metadata
Assignees
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzers
Type
Projects
Status
No status