Bug 14168 - Xamarin.Android 4.8 adds incomplete TypeInfo class to mscorlib
Summary: Xamarin.Android 4.8 adds incomplete TypeInfo class to mscorlib
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: mscorlib ()
Version: master
Hardware: All All
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
: 14608 ()
Depends on:
Blocks:
 
Reported: 2013-08-21 17:35 UTC by Damon Bohls
Modified: 2013-10-04 11:36 UTC (History)
5 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and 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 Links.

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.

Related Links:
Status:
RESOLVED FIXED

Description Damon Bohls 2013-08-21 17:35:22 UTC
The following code:

    typeof(double).GetTypeInfo().GetGenericArguments()

should return

    {System.Type[0]}

but instead causes an exception:

    System.NotSupportedException: Operation is not supported.
Comment 1 Jonathan Pryor 2013-08-27 21:02:22 UTC
Cursory analysis, the problem is that the IntrospectionExtensions.GetTypeInfo() extension method returns a TypeDelegator instance, which inherits TypeInfo, which inherits Type.

The problem seems to be that TypeDelegator doesn't override and delegate Type.GetGenericArguments(), resulting in the default Type.GetGenericArguments() behavior which throws NotSupportedException.
Comment 2 Marek Safar 2013-08-28 11:56:25 UTC
Fixed in mono master
Comment 3 Jonathan Pryor 2013-09-12 18:07:21 UTC
*** Bug 14608 has been marked as a duplicate of this bug. ***