Fix NRE when getting annotations on delegate constructor for delegates defined in Java (because these constructors don't really exist).

This commit is contained in:
jfrijters 2009-07-27 08:04:30 +00:00
Родитель 6f7231d956
Коммит 9c28395a5a
1 изменённых файлов: 10 добавлений и 0 удалений

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

@ -10110,6 +10110,11 @@ namespace IKVM.Internal
internal override object[] GetMethodAnnotations(MethodWrapper mw)
{
MethodBase mb = mw.GetMethod();
if(mb == null)
{
// delegate constructor
return null;
}
if(mb.DeclaringType.Assembly.ReflectionOnly)
{
// TODO on Whidbey this must be implemented
@ -10121,6 +10126,11 @@ namespace IKVM.Internal
internal override object[][] GetParameterAnnotations(MethodWrapper mw)
{
MethodBase mb = mw.GetMethod();
if(mb == null)
{
// delegate constructor
return null;
}
if(mb.DeclaringType.Assembly.ReflectionOnly)
{
// TODO on Whidbey this must be implemented