Skip to content

Commit

Permalink
Don't warn for RUC from DebuggerDisplayAttribute
Browse files Browse the repository at this point in the history
  • Loading branch information
sbomer committed Jun 30, 2021
1 parent f549b4e commit cd7d310
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/linker/Linker.Steps/MarkStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2747,6 +2747,10 @@ void ProcessRequiresUnreferencedCode (MethodDefinition method, DependencyKind de

case DependencyKind.Custom:
case DependencyKind.Unspecified:

// Don't warn for methods kept due to non-understood DebuggerDisplayAttribute
// until https://github.com/mono/linker/issues/1873 is fixed.
case DependencyKind.KeptForSpecialAttribute:
return;

default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -689,7 +689,8 @@ public static void Test ()

class AccessThroughSpecialAttribute
{
[ExpectedWarning ("IL2026", "--DebuggerProxyType.Method--")]
// https://github.com/mono/linker/issues/1873
// [ExpectedWarning ("IL2026", "--DebuggerProxyType.Method--")]
[DebuggerDisplay ("Some{*}value")]
class TypeWithDebuggerDisplay
{
Expand Down

0 comments on commit cd7d310

Please sign in to comment.