IronLanguages/main — pull request #116 by WildOgr (2013-06-06 15:07:42+00:00)
Title: DocBuilder exception fixed (when open generic type is used)

__doc__ throws exception if it encounter open generic type. Proposal is to just use name in such case. E.g. if we have following code in LibB dll:

namespace Test
{
public class ValidGeneric
{
public ValidGeneric(T value) {}
}

public class Generic where T : IEquatable
{
public Generic(T value) {}
}
}

and python code is:

import clr
clr.AddReference("LibB")
from Test import ValidGeneric
print ValidGeneric.__doc__
from Test import Generic
print Generic.__doc__

current behavior will be

ValidGeneric[T](value: T)

Traceback (most recent call last):
File "test.py", line 6, in
SystemError: Method must be called on a Type for which Type.IsGenericParameter is false.

After fix:

ValidGeneric[T](value: T)

Generic[T](value: T)