Add check for predicates with an override annotation

This commit is contained in:
Joe Farebrother
2021-10-13 12:22:46 +01:00
parent 33bd267eb0
commit 1b4130fe97

View File

@@ -81,5 +81,6 @@ where
not usesThis(pred) and
not isTrivialImplementation(pred) and
not isSingleton(pred.getDeclaringType()) and
not exists(ClassPredicate other | pred.overrides(other) or other.overrides(pred))
not exists(ClassPredicate other | pred.overrides(other) or other.overrides(pred)) and
not pred.isOverride()
select pred, "This predicate could be a classless predicate, as it doesn't depend on `this`."