Bug 12205 - MethodInfo.ReflectedType returns declaring type for generic base classes
Summary: MethodInfo.ReflectedType returns declaring type for generic base classes
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: unspecified
Hardware: PC Linux
: --- major
Target Milestone: ---
Assignee: Aleksey Kliger
Depends on:
Reported: 2013-05-11 08:28 UTC by GordonML
Modified: 2017-07-14 19:21 UTC (History)
4 users (show)

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

A test file which exposes the bug (974 bytes, text/plain)
2013-05-11 08:28 UTC, GordonML

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:

Description GordonML 2013-05-11 08:28:40 UTC
Created attachment 3950 [details]
A test file which exposes the bug

When calling GetMethod() on a derived class which has a generic base class, returned MethodInfo objects will have the wrong ReflectedType for inherited members, i.e. it returns the declaring type.
Comment 1 Aleksey Kliger 2017-07-14 19:21:28 UTC
Fixed by de74da81bf0b94e4c594abea19f9b737ac012005 back in January 2016 (So... mono 4.6.0 onwards).  Not sure why this is still open.