Bug 27010 - Difference in Assembly.GetExportedTypes with .NET
Summary: Difference in Assembly.GetExportedTypes with .NET
Alias: None
Product: Runtime
Classification: Mono
Component: Reflection ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2015-02-12 16:51 UTC by Marius Ungureanu
Modified: 2015-02-17 14:49 UTC (History)
4 users (show)

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:

Description Marius Ungureanu 2015-02-12 16:51:36 UTC
Using [0] as a base, with the patch at [1] applied, Assembly.GetExportedTypes is wrongfully reporting internal delegates as public types.

I didn't know where to open this bug report, so I'm using misc. The test passes without [1] on MS.NET.

[0] - https://github.com/libgit2/libgit2sharp/pull/956
[1] - https://gist.github.com/Therzok/2b0e4db6cb84a434e6cf

I have tested out that it's not a compiler bug. Either a runtime or a BCL bug.
Comment 1 Marius Ungureanu 2015-02-16 02:39:20 UTC
Expanding further, any nested type is seen wrong.

class Internal
    public class Inner {}

Is the simplest test case I can come up with. On Mono, Internal+Inner is seen as an exported type, while on .NET it is not. We're probably not doing 'and' with the containing type.
Comment 2 Marius Ungureanu 2015-02-16 04:27:38 UTC
Opened https://github.com/mono/mono/pull/1570 to try and fix it myself.
Comment 3 Rodrigo Kumpera 2015-02-17 14:49:16 UTC