mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Fixed bug where some predicates were flagged without return type even thought they had
This commit is contained in:
@@ -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().
|
||||
|
||||
@@ -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())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user