Skip to content

Commit

Permalink
Fix an issue with naming for method semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
ds5678 committed Jul 12, 2024
1 parent 5a615d5 commit 331cee4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Il2CppInterop.Generator/Contexts/MethodRewriteContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,10 @@ private string ProduceMethodSignatureBase()
if (method.IsStatic) builder.Append("_Static");
if (method.IsFinal) builder.Append("_Final");
if (method.IsNewSlot) builder.Append("_New");
foreach (var (semantic, str) in SemanticsToCheck)
if ((semantic & method.Semantics?.Attributes) != 0)
builder.Append(str);
if (method.Semantics is not null)
foreach (var (semantic, str) in SemanticsToCheck)
if ((semantic & method.Semantics?.Attributes) != 0)
builder.Append(str);

builder.Append('_');
builder.Append(DeclaringType.AssemblyContext.RewriteTypeRef(method.Signature?.ReturnType).GetUnmangledName());
Expand Down

0 comments on commit 331cee4

Please sign in to comment.