mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
Change the behaviour of `API::getInstance()` and `API::getReturn()` to include results on subclasses of the current API node.
14 lines
342 B
Plaintext
14 lines
342 B
Plaintext
/**
|
|
* Tests of the public API of API Graphs
|
|
*/
|
|
|
|
import codeql.ruby.ApiGraphs
|
|
|
|
query predicate classMethodCalls(API::Node node) {
|
|
node = API::getTopLevelMember("M1").getMember("C1").getReturn("m")
|
|
}
|
|
|
|
query predicate instanceMethodCalls(API::Node node) {
|
|
node = API::getTopLevelMember("M1").getMember("C1").getInstance().getReturn("m")
|
|
}
|