Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/9.0-staging] Allow nested types inside of the <Module> type #111479

Open
wants to merge 1 commit into
base: release/9.0-staging
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/coreclr/vm/clsload.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3482,6 +3482,12 @@ VOID ClassLoader::AddAvailableClassHaveLock(
if (SUCCEEDED(pMDImport->GetNestedClassProps(classdef, &enclosing))) {
// nested type

if (enclosing == COR_GLOBAL_PARENT_TOKEN)
{
// Types nested in the <module> class can't be found by lookup.
return;
}

COUNT_T classEntryIndex = RidFromToken(enclosing) - 1;
_ASSERTE(RidFromToken(enclosing) < RidFromToken(classdef));
if (classEntries->GetCount() > classEntryIndex)
Expand Down
Loading