Skip to content

Commit

Permalink
Workaround NRE in SweepStep
Browse files Browse the repository at this point in the history
Basically a workaround for dotnet#2260. This simply goes back to using the `Resolve` method and avoid the cache for now.
  • Loading branch information
vitek-karas committed Sep 7, 2021
1 parent 6dc3aa7 commit 7cc4e85
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/linker/Linker.Steps/SweepStep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,10 @@ void UpdateScopeOfTypeReference (TypeReference type)
//
// Resolve to type definition to remove any type forwarding imports
//
TypeDefinition td = resolver.TryResolve (type);
// Workaround for https://github.com/mono/linker/issues/2260
#pragma warning disable RS0030 // Do not used banned APIs
TypeDefinition td = type.Resolve ();
#pragma warning restore RS0030 // Do not used banned APIs
if (td == null) {
//
// This can happen when not all assembly refences were provided and we
Expand Down

0 comments on commit 7cc4e85

Please sign in to comment.