Files
codeql/java/ql/test-kotlin2/library-tests/inheritence-substitution/test.ql
2023-11-17 14:07:13 +00:00

18 lines
543 B
Plaintext

import java
RefType getADatabaseSubtype(RefType rt) {
extendsReftype(rt, result)
or
implInterface(rt, result)
}
from Parameter p, RefType paramType, KotlinType paramKtType, string paramAncestorType
where
p.fromSource() and
p.getCallable().getName() = "user" and
p.getType() = paramType and
p.getKotlinType() = paramKtType and
// Stringified to avoid printing the source-location (i.e. stdlib path) of `Any?`
getADatabaseSubtype+(paramType).toString() = paramAncestorType
select p, paramType, paramKtType, paramAncestorType