mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
Issue: The previous code, with new tests [1], failed when the linker was enabled. That was caused because the code looks for the Keys and Item properties getter using reflection. The linker handled that imperfectly (it left some holes), in part because: * System.Collections.Generic.IDictionary`2 does not implement System.Collections.IDictionary; and * It preserved the explicit methods - not the implicit one that were used the the reflection-based code; That later fact is also a bug (without the linker involvment) and solved by this commit. A unit test was added to show the issue (NRE). The patch also avoid the use of reflection for IDictionary since we can simply typecast to get the same result (without the additional cost).