-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ILLink analyzer produces dataflow warnings even for invalid annotations #101211
Closed
Tracked by
#101149
Labels
area-Tools-ILLink
.NET linker development as well as trimming analyzers
in-pr
There is an active PR which will close this issue when it is merged
Milestone
Comments
Tagging subscribers to this area: @dotnet/area-meta |
dotnet-policy-service
bot
added
the
untriaged
New issue has not been triaged by the area owner
label
Apr 17, 2024
sbomer
added
the
area-Tools-ILLink
.NET linker development as well as trimming analyzers
label
Apr 17, 2024
Tagging subscribers to this area: @agocke, @sbomer, @vitek-karas |
Looks like ILLink/ILC can have a similar issue in some cases (found by tests added in #101214): static UnsupportedType GetUnsupportedTypeInstance () => null;
[return: DynamicallyAccessedMembers (DynamicallyAccessedMemberTypes.PublicMethods)]
static UnsupportedType GetWithPublicMethods () {
return GetUnsupportedTypeInstance (); // Unexpected IL2073 from ILLink/ILC
} |
sbomer
added a commit
that referenced
this issue
Apr 18, 2024
Adds some test coverage for #101211, including a case where ILLink/NativeAot have a similar issue.
42 tasks
matouskozak
pushed a commit
to matouskozak/runtime
that referenced
this issue
Apr 30, 2024
Adds some test coverage for dotnet#101211, including a case where ILLink/NativeAot have a similar issue.
Ruihan-Yin
pushed a commit
to Ruihan-Yin/runtime
that referenced
this issue
May 30, 2024
Adds some test coverage for dotnet#101211, including a case where ILLink/NativeAot have a similar issue.
dotnet-policy-service
bot
added
the
in-pr
There is an active PR which will close this issue when it is merged
label
Aug 19, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
area-Tools-ILLink
.NET linker development as well as trimming analyzers
in-pr
There is an active PR which will close this issue when it is merged
DynamicallyAccessedMembers
annotations are only allowed on parameters of certain types, such asType
andstring
. While the analyzer correctly reports a warning about annotations on unsupported types, it still respects those annotations:IL2098 is expected, but IL2072 is not. The invalid annotations should not produce further warnings for assignments to that location.
The text was updated successfully, but these errors were encountered: