Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
GitHub or Developer Community with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
We are running into this in the IronPython test suite. There is a test that imports the extension methods from System.Linq and then chains Where() and Select() calls on a collection. The Select() after the Where() functions correctly on MS.NET because of some code added to check for some specific cases which are found here:
In MS.NET, Value.DeclaringType.FullName returns null, but in the Mono case it returns System.Collections.Generic.IEnumerable`1[[TSource]].
In MSDN it says this about FullName:
The fully qualified name of the type, including its namespace but not its assembly; or null if the current instance represents a generic type parameter, an array type, pointer type, or byref type based on a type parameter, or a generic type that is not a generic type definition but contains unresolved type parameters.
I'm not sure which of the clauses is causing it to return null on MS.NET exactly, I haven't looked deeply into the code.
This looks like a workaround for .NET bug. MSDN documents FullName null behaviour only for type parameter which is not this case. This case is type parameter parent type which I believe can never by another type parameter.
Simple example like
public static void Foo<U>()
var ga = MethodBase.GetCurrentMethod().GetGenericArguments();
var fn = ga.DeclaringType.FullName;
works consistently on .NET and Mono