Skip to content

Commit

Permalink
Backport #102613 to preview 5 (#102778)
Browse files Browse the repository at this point in the history
  • Loading branch information
jtschuster authored May 29, 2024
1 parent d89832a commit 0624390
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/tools/illink/src/linker/Linker.Steps/MarkStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3508,9 +3508,7 @@ protected internal void MarkProperty (PropertyDefinition prop, in DependencyInfo

protected internal virtual void MarkEvent (EventDefinition evt, in DependencyInfo reason, MessageOrigin origin)
{
Debug.Assert (reason.Source is IMemberDefinition or null);
// Use reason as the origin for the event methods unless it's from a descriptor
origin = reason.Source is null ? origin : new MessageOrigin ((IMemberDefinition)reason.Source);
origin = reason.Source is IMemberDefinition member ? new MessageOrigin (member) : origin;
DependencyKind dependencyKind = DependencyKind.EventMethod;

MarkMethodIfNotNull (evt.AddMethod, new DependencyInfo (dependencyKind, evt), origin);
Expand Down

0 comments on commit 0624390

Please sign in to comment.