Rust: allow VariableAccess elements to have another primary QL class

This commit is contained in:
Arthur Baars
2024-10-25 11:02:55 +02:00
parent a6e69eb147
commit a08b4b7372

View File

@@ -20,7 +20,9 @@ query predicate multipleToStrings(Element e, string s) {
*/
query predicate multipleLocations(Locatable e) { strictcount(e.getLocation()) > 1 }
private predicate multiplePrimaryQlClasses(Element e) { strictcount(e.getAPrimaryQlClass()) > 1 }
private predicate multiplePrimaryQlClasses(Element e) {
strictcount(string cls | cls = e.getAPrimaryQlClass() and cls != "VariableAccess") > 1
}
/**
* Holds if `e` has more than one `getPrimaryQlClasses()` result.