Closed mspertus closed 2 months ago
Thank you for the PR, can you also add a test case ensuring this works as expected and won't break later on by accident.
Thanks, Lahma. I've added a test and confirmed that it fails without the PR (dotnet462 windows) and passes with it.
Thanks, @lahma!
resolves sebastienros/jint#1962
When
TypeResolver:TryFindMemberAccessor
resolves a property, it might find one that was hidden where the non-hidden one would normally be found by C++ member access.For example, when you access the
A
member from JavaScript, you may get the hidden one (I say "may" becauseType:GetProperties
does not specify an order in a number of versions of .NET supported by jint).(This dotnet fiddle shows that both
A
elements are iterated byGetProperties
even though ifb
is aBar
,b.A
unambiguously refers toBar:A
)This change ensures that in the case where a property in a derived class hides another, the derived one is resolved to.