Skip to content

Commit

Permalink
Remove nullability shut-ups from CreateMemberReference
Browse files Browse the repository at this point in the history
  • Loading branch information
extraes committed Dec 25, 2024
1 parent 7272bdf commit 3f509b2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Il2CppInterop.Generator/Passes/Pass61ImplementAwaiters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ public static void DoPass(RewriteGlobalContext context)
var typeArguments = Enumerable.Range(0, genericParameterCount).Select(i => new GenericParameterSignature(GenericParameterType.Type, i)).ToArray();
var interopOnCompleteGeneric = typeContext.NewType.MakeGenericInstanceType(typeArguments)
.ToTypeDefOrRef()
.CreateMemberReference(interopOnCompleted.Name!, interopOnCompleted.Signature!); // MemberReference ctor uses nullables, so we can tell the compiler "shut up I know what I'm doing"
.CreateMemberReference(interopOnCompleted.Name, interopOnCompleted.Signature);

Check warning on line 106 in Il2CppInterop.Generator/Passes/Pass61ImplementAwaiters.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'memberName' in 'MemberReference TypeDescriptorExtensions.CreateMemberReference(IMemberRefParent parent, string memberName, MemberSignature signature)'.

Check warning on line 106 in Il2CppInterop.Generator/Passes/Pass61ImplementAwaiters.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'signature' in 'MemberReference TypeDescriptorExtensions.CreateMemberReference(IMemberRefParent parent, string memberName, MemberSignature signature)'.

Check warning on line 106 in Il2CppInterop.Generator/Passes/Pass61ImplementAwaiters.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'memberName' in 'MemberReference TypeDescriptorExtensions.CreateMemberReference(IMemberRefParent parent, string memberName, MemberSignature signature)'.

Check warning on line 106 in Il2CppInterop.Generator/Passes/Pass61ImplementAwaiters.cs

View workflow job for this annotation

GitHub Actions / build

Possible null reference argument for parameter 'signature' in 'MemberReference TypeDescriptorExtensions.CreateMemberReference(IMemberRefParent parent, string memberName, MemberSignature signature)'.
instructions.Add(CilOpCodes.Call, interopOnCompleteGeneric);
}
else
Expand Down

0 comments on commit 3f509b2

Please sign in to comment.