Fix resolveVirtualMethodHelper to check for explicit override cases
authorAndy Ayers <andya@microsoft.com>
Fri, 3 Aug 2018 02:20:48 +0000 (19:20 -0700)
committerAndy Ayers <andya@microsoft.com>
Fri, 3 Aug 2018 02:24:51 +0000 (19:24 -0700)
commit50584f2129b7b76a6567bce8879031cf974af15e
treed7d1cf556d89187301eadba467aa262adf55f897
parentc62976e0aaef8c8fb456b16f21b9fe3bd73a40a5
Fix resolveVirtualMethodHelper to check for explicit override cases

Explicit method overrides in a class can override a virtual final method
with different method. This is only possible if the different method
first is introduced in a new slot. So when devirtualizing, verify that the
slot of the derived method matches the slot of the base method.

If they don't match, just bail on devirtualizing.

Fixes #19222.
src/vm/jitinterface.cpp
tests/src/JIT/Regression/JitBlue/GitHub_19222/GitHub_19222.il [new file with mode: 0644]
tests/src/JIT/Regression/JitBlue/GitHub_19222/GitHub_19222.ilproj [new file with mode: 0644]