Fixed regression introduced with "type 2" field accessor fix. Null type doesn't need downcast and needs to be explicitly handled, because you aren't allowed to call GetPublicBaseTypeWrapper() on it.

This commit is contained in:
jfrijters 2009-12-09 05:49:30 +00:00
Родитель cd808950a8
Коммит ce1e5be3fc
1 изменённых файлов: 4 добавлений и 0 удалений

Просмотреть файл

@ -3227,6 +3227,10 @@ sealed class Compiler
private bool NeedsInterfaceDownCast(TypeWrapper tw, TypeWrapper arg)
{
if (tw == VerifierTypeWrapper.Null)
{
return false;
}
if (!tw.IsAccessibleFrom(clazz))
{
tw = tw.GetPublicBaseTypeWrapper();