Skip to content

Commit

Permalink
Address remaining Ref.Emit warnings in Mono.
Browse files Browse the repository at this point in the history
Contributes to dotnet#45623
  • Loading branch information
eerhardt committed Dec 7, 2020
1 parent 301056d commit 13f9933
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 18 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ private static MethodInfo ExtractBaseMethod(MethodInfo info)
}

// Called from the runtime to return the corresponding finished MethodInfo object
[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2060:MakeGenericMethod",
Justification = "MethodOnTypeBuilderInst is Reflection.Emit's underlying implementation of MakeGenericMethod. " +
"Callers of the outer calls to MakeGenericMethod will be warned as appropriate.")]
internal MethodInfo RuntimeResolve()
{
Type type = instantiation.InternalResolve();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,8 @@ private bool has_ctor_method()
return this;
}

[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2074:UnrecognizedReflectionPattern",
Justification = "Linker doesn't analyze ResolveUserType but it's an identity function")]
private void ResolveUserTypes()
{
parent = ResolveUserType(parent);
Expand Down Expand Up @@ -1615,7 +1617,7 @@ public FieldBuilder DefineUninitializedData(string name, int size, FieldAttribut
public override int MetadataToken => 0x02000000 | table_idx;

[UnconditionalSuppressMessage("ReflectionAnalysis", "IL2074:UnrecognizedReflectionPattern",
Justification = "Linker doesn't recongnize ResolveUserType")]
Justification = "Linker doesn't analyze ResolveUserType but it's an identity function")]
public void SetParent([DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.All)] Type? parent)
{
check_not_created();
Expand Down

0 comments on commit 13f9933

Please sign in to comment.