Skip to content

Commit 331cee4

Browse files
committed
Fix an issue with naming for method semantics
1 parent 5a615d5 commit 331cee4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

Il2CppInterop.Generator/Contexts/MethodRewriteContext.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,9 +219,10 @@ private string ProduceMethodSignatureBase()
219219
if (method.IsStatic) builder.Append("_Static");
220220
if (method.IsFinal) builder.Append("_Final");
221221
if (method.IsNewSlot) builder.Append("_New");
222-
foreach (var (semantic, str) in SemanticsToCheck)
223-
if ((semantic & method.Semantics?.Attributes) != 0)
224-
builder.Append(str);
222+
if (method.Semantics is not null)
223+
foreach (var (semantic, str) in SemanticsToCheck)
224+
if ((semantic & method.Semantics?.Attributes) != 0)
225+
builder.Append(str);
225226

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

0 commit comments

Comments
 (0)