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

EnC: workaround for empty display class #73366

Merged
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,14 @@ void recurse(ImmutableArray<ISymbolInternal> members, DebugId? containingDisplay
Debug.Assert(!containingDisplayClassId.HasValue);

var displayClass = (INamedTypeSymbolInternal)member;
var displayClassMembers = (synthesizedMemberMap != null) ? synthesizedMemberMap[displayClass] : displayClass.GetMembers();

// Synthesized member map, if given, contains all the synthesized members that implement lambdas and closures.
// If not given (for PE symbols) the members are defined on the type symbol directly.
// If the display class doesn't have any synthesized members it won't be present in the map.
// See https://github.com/dotnet/roslyn/issues/73365
var displayClassMembers = synthesizedMemberMap != null
? (synthesizedMemberMap.TryGetValue(displayClass, out var m) ? m : [])
: displayClass.GetMembers();

if (displayClass.TypeKind == TypeKind.Struct)
{
Expand Down
Loading