You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assembly with analyzer gives erroneous REFL041. This is probably because it can't see internal members, so it makes the invalid assumption that GetProperty must be targeting IFoo.Bar rather than the Foo.Bar that may or may not be there:
classC{voidM(){
Delegate.CreateDelegate(// REFL041 Delegate type is not matching expected Func<IFoo, object>// ↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓typeof(Func<Foo,object>),typeof(Foo).GetProperty("Bar", BindingFlags.NonPublic | BindingFlags.Instance).GetMethod);}}
However, this form does not give REFL041. Potentially a second bug where these two forms are not seen as equivalent:
Assembly referenced through a binary (compiled) metadata reference:
Assembly with analyzer gives erroneous REFL041. This is probably because it can't see internal members, so it makes the invalid assumption that GetProperty must be targeting
IFoo.Bar
rather than theFoo.Bar
that may or may not be there:However, this form does not give REFL041. Potentially a second bug where these two forms are not seen as equivalent:
The text was updated successfully, but these errors were encountered: