Check if the override declaration is visible to the body.
authorRodrigo Kumpera <kumpera@gmail.com>
Mon, 21 Feb 2011 20:51:01 +0000 (21:51 +0100)
committerRodrigo Kumpera <kumpera@gmail.com>
Mon, 21 Feb 2011 20:53:59 +0000 (21:53 +0100)
commitad43d7bd734184dcb61fc26834674a1ed64fb83b
tree550012fe8d34b92a6699f84343c913cc894b25e0
parenteac667af686b6308852f7072ad4253dfa4ed569e
Check if the override declaration is visible to the body.

* class.c (verify_class_overrides): The override declaration
must be visible to the override body otherwise fail the type.
This protects against types trying to override internal
methods of types from other assemblies.

* class.c (mono_class_setup_vtable_general): Do the same
check for implicit overrides (those based only on name & sig).

Fixes #609813
mono/metadata/class.c