Use "" in qualified name for entities without a package

This commit is contained in:
Owen Mansel-Chan
2024-05-06 07:29:00 +01:00
parent 0338ffd125
commit fb74a2a170

View File

@@ -103,7 +103,11 @@ class Entity extends @object {
*/
pragma[nomagic]
predicate hasQualifiedName(string pkg, string name) {
pkg = this.getPackage().getPath() and
(
pkg = this.getPackage().getPath()
or
not exists(this.getPackage()) and pkg = ""
) and
name = this.getName()
}