fix getting MethodInfo
This commit is contained in:
parent
5fa4d9fce7
commit
84b0dfe537
|
|
@ -11610,12 +11610,7 @@ namespace PascalABCCompiler.NETGenerator
|
|||
|
||||
if (is_generic)
|
||||
{
|
||||
if (value.ElementType.node_kind == node_kind.compiled)
|
||||
{
|
||||
enumer_mi = TypeFactory.IEnumerableGenericType.MakeGenericType(elementType).GetMethod("GetEnumerator");
|
||||
return_type = enumer_mi.ReturnType;
|
||||
}
|
||||
else
|
||||
if (helper.IsConstructedGenericType(elementType))
|
||||
{
|
||||
enumer_mi = TypeBuilder.GetMethod(
|
||||
TypeFactory.IEnumerableGenericType.MakeGenericType(elementType),
|
||||
|
|
@ -11626,6 +11621,11 @@ namespace PascalABCCompiler.NETGenerator
|
|||
.GetGenericTypeDefinition()
|
||||
.MakeGenericType(elementType);
|
||||
}
|
||||
else
|
||||
{
|
||||
enumer_mi = TypeFactory.IEnumerableGenericType.MakeGenericType(elementType).GetMethod("GetEnumerator");
|
||||
return_type = enumer_mi.ReturnType;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue