Fixed bug where some predicates were flagged without return type even thought they had

This commit is contained in:
Napalys
2024-11-29 17:24:58 +01:00
parent a462ec91f5
commit 7c1aa84459
2 changed files with 6 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ predicate isGetPredicate(Predicate pred) { pred.getName().regexpMatch("(get|as)[
/**
* Checks if a predicate has a return type.
*/
predicate hasReturnType(Predicate pred) { exists(pred.getReturnType()) }
predicate hasReturnType(Predicate pred) { exists(pred.getReturnTypeExpr()) }
/**
* Checks if a predicate is an alias using getAlias().

View File

@@ -35,3 +35,8 @@ predicate assessment() { none() }
// OK -- starts with as and returns a value
string asString() { result = "string" }
// OK -- starts with get and returns a value
HiddenType getInjectableCompositeActionNode() {
exists(HiddenType hidden | result = hidden.toString())
}