-
Notifications
You must be signed in to change notification settings - Fork 128
Closed
Labels
Description
The GetDisplayName extension method uses "." as path delimiters for nested classes, but the FullName member uses "/".
MessageContainer.cs appends either the GetDisplayName string or FullPath to the warnings, and strings passed in usually use GetDisplayName.
if (Origin?.Provider is MethodDefinition method)
sb.Append (method.GetDisplayName ());
else if (Origin?.Provider is IMemberDefinition member)
sb.Append (member.FullName);
else if (Origin?.Provider is AssemblyDefinition assembly)
sb.Append (assembly.Name.Name);
else
throw new NotSupportedException ();This leads to different looking paths in the same warning:
Trim analysis warning IL2109: Mono.Linker.Tests.Cases.RequiresCapability.RequiresCapability/RequiresOnClass/DerivedWithoutRequires: Type 'Mono.Linker.Tests.Cases.RequiresCapability.RequiresCapability.RequiresOnClass.DerivedWithoutRequires' derives from 'Mono.Linker.Tests.Cases.RequiresCapability.RequiresCapability.RequiresOnClass.ClassWithRequires' which has 'RequiresUnreferencedCodeAttribute'. Message for --ClassWithRequires--.