Go: avoid overlay-discarding @file entities

...since they are shared between base and overlay
This commit is contained in:
Nick Rolfe
2025-11-05 12:29:31 +00:00
parent 734cba7b9c
commit 44654bdef6

View File

@@ -20,7 +20,9 @@ private @file getFile(@locatable locatable) {
/** Holds if the `locatable` is in the `file` and is part of the overlay base database. */
private predicate discardableLocatable(@file file, @locatable locatable) {
not isOverlay() and
file = getFile(locatable)
file = getFile(locatable) and
// Avoid discarding @file entities, since they are shared between base and overlay.
not locatable instanceof @file
}
/**