Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

GenFacades should not emit nested exported type entries if the nested type is not visible outside the assembly #274

Closed
nguerrera opened this issue Sep 18, 2015 · 3 comments
Assignees

Comments

@nguerrera
Copy link

See Program.cs#L488

We replicated the behavior of csc.exe at the time. However, some tools get upset when they find an exported type entry that can't resolve even if there is no actual use of the entry encountered. Those tools should be hardened appropriately, but we might as well also help them out by not emitting what isn't necessary.

Things to consider:

  • InternalsVisibleTo: I am not certain how type forwards behave relative to it, but I believe it would depend on whether the caller is a friend of the destination. We may want to keep anything that is visible to friends and only cull things invisible outside assembly even in the face of InternalsVisibleTo.
  • Check the behavior of Roslyn. Does it still emit these from a [TypeForwardedTo(TopLevelTypeWithPrivateNestedTypes)]?) If so, we should file a bug against the compiler as well.
@joperezr
Copy link
Member

@nguerrera Thanks for filing the issue, I'll fix this.

@nguerrera
Copy link
Author

cc @weshaggard

@joperezr
Copy link
Member

Closed with #275

rainersigwald pushed a commit to rainersigwald/buildtools that referenced this issue Apr 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants