Files
codeql/java/ql/test-kotlin1/library-tests/inheritence-substitution/test.ql
2023-11-21 15:28:12 +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