зеркало из https://github.com/mono/ikvm-fork.git
Make Type.__ContainsMissingType return true for generic type parameters that have constraints that return true for __ContainsMissingType.
This commit is contained in:
Родитель
af5b21e7af
Коммит
f7223b934d
|
@ -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
|
This software is provided 'as-is', without any express or implied
|
||||||
warranty. In no event will the authors be held liable for any damages
|
warranty. In no event will the authors be held liable for any damages
|
||||||
|
@ -87,6 +87,21 @@ namespace IKVM.Reflection.Reader
|
||||||
{
|
{
|
||||||
get { return true; }
|
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
|
sealed class UnboundGenericMethodParameter : TypeParameterType
|
||||||
|
|
Загрузка…
Ссылка в новой задаче