-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Open
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzers
Milestone
Description
string str = GetWithPublicMethods ();
if (String.Empty.Length == 0) {
str = GetWithPublicFields (); // dataflow will merge this with the value from the previous basic block
RequirePublicFields (str); // produces a warning
}In the above sample, at the point of calling RequirePublicFields the str local is guaranteed to have the value coming only from GetWithPublicFields(), so it should not warn. But linker doesn't correctly track the values in this case.
There is an existing test case which covers this, but we don't have an issue for it: https://github.com/dotnet/linker/blob/5fca8b890c194c837d21513e43a361a5f5b357a6/test/Mono.Linker.Tests.Cases/DataFlow/LocalDataFlow.cs#L224-L232
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