Skip to content

Commit

Permalink
Ensure we have a DependencyList in TryGetDependenciesForReflectedType (
Browse files Browse the repository at this point in the history
…dotnet#1028)

Psychic debugging tells me this should fix dotnet#1027.
  • Loading branch information
MichalStrehovsky authored Apr 27, 2021
1 parent 61c0b6d commit 3ad5624
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,8 @@ public static bool TryGetDependenciesForReflectedType(ref DependencyList depende
{
type = type.GetTypeDefinition();
}

dependencies ??= new DependencyList();

dependencies.Add(factory.MaximallyConstructableType(type), reason);

Expand Down

0 comments on commit 3ad5624

Please sign in to comment.