Java: Allow methods with empty bodies for overlay

This commit is contained in:
Kasper Svendsen
2025-01-14 12:24:14 +01:00
parent 6e92d7e247
commit 0ee6a78a4a

View File

@@ -624,7 +624,13 @@ class SrcMethod extends Method {
then implementsInterfaceMethod(result, this)
else result.getASourceOverriddenMethod*() = this
) and
(exists(result.getBody()) or result.hasModifier("native"))
(
// We allow empty method bodies for the local overlay variant to allow
// calls to methods only fully extracted in base.
isOverlay() or
exists(result.getBody()) or
result.hasModifier("native")
)
}
}