Make Type.__ContainsMissingType return true for generic type parameters that have constraints that return true for __ContainsMissingType.

This commit is contained in:
jfrijters 2012-04-17 11:21:55 +00:00
Родитель af5b21e7af
Коммит f7223b934d
1 изменённых файлов: 16 добавлений и 1 удалений

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

@ -1,5 +1,5 @@
/*
Copyright (C) 2009 Jeroen Frijters
Copyright (C) 2009-2012 Jeroen Frijters
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
@ -87,6 +87,21 @@ namespace IKVM.Reflection.Reader
{
get { return true; }
}
public sealed override bool __ContainsMissingType
{
get
{
foreach (Type type in GetGenericParameterConstraints())
{
if (type.__ContainsMissingType)
{
return true;
}
}
return false;
}
}
}
sealed class UnboundGenericMethodParameter : TypeParameterType