Skip to content

Commit cb08025

Browse files
committed
Revert "[generator] Ensure DIM from assembly refs are correctly marked (#770)"
This reverts commit d6363db. Oops, wrong banch.
1 parent d6363db commit cb08025

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

tools/generator/Java.Interop.Tools.Generator.Importers/CecilApiImporter.cs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ public static Method CreateMethod (GenBase declaringType, MethodDefinition m)
191191
IsAbstract = m.IsAbstract,
192192
IsAcw = reg_attr != null,
193193
IsFinal = m.IsFinal,
194-
IsInterfaceDefaultMethod = IsDefaultInterfaceMethod (declaringType, m),
194+
IsInterfaceDefaultMethod = GetJavaDefaultInterfaceMethodAttribute (m.CustomAttributes) != null,
195195
IsReturnEnumified = GetGeneratedEnumAttribute (m.MethodReturnType.CustomAttributes) != null,
196196
IsStatic = m.IsStatic,
197197
IsVirtual = m.IsVirtual,
@@ -248,16 +248,5 @@ static string GetObsoleteComment (CustomAttribute attribute) =>
248248

249249
static CustomAttribute GetRegisterAttribute (Collection<CustomAttribute> attributes) =>
250250
attributes.FirstOrDefault (a => a.AttributeType.FullNameCorrected () == "Android.Runtime.RegisterAttribute");
251-
252-
static bool IsDefaultInterfaceMethod (GenBase declaringType, MethodDefinition method)
253-
{
254-
if (!(declaringType is InterfaceGen))
255-
return false;
256-
257-
if (GetJavaDefaultInterfaceMethodAttribute (method.CustomAttributes) != null)
258-
return true;
259-
260-
return !method.IsAbstract && !method.IsStatic;
261-
}
262251
}
263252
}

0 commit comments

Comments
 (0)