Skip to content
Original file line number Diff line number Diff line change
Expand Up @@ -982,10 +982,8 @@ private void AddNecessaryAsyncReferences(MethodDesc method)

// Keep in sync with CorInfoImpl.getAsyncInfo()
DefType continuation = TypeSystemContext.ContinuationType;
var asyncHelpers = TypeSystemContext.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "AsyncHelpers"u8);
// AsyncHelpers should already be referenced in the module for the call to Await()
Debug.Assert(!_nodeFactory.Resolver.GetModuleTokenForType(asyncHelpers, allowDynamicallyCreatedReference: true, throwIfNotFound: false).IsNull);
TypeDesc[] requiredTypes = [continuation];
TypeDesc asyncHelpers = TypeSystemContext.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "AsyncHelpers"u8);
TypeDesc[] requiredTypes = [asyncHelpers, continuation];
FieldDesc[] requiredFields =
[
// For CorInfoImpl.getAsyncInfo
Expand Down
Loading