Files
codeql/python/ql/test/library-tests/objects/Literals.ql
2020-03-30 11:59:10 +02:00

13 lines
325 B
Plaintext

/* Test that there are no literals that do not have a corresponding object. */
import python
string repr(Expr e) {
result = e.(Num).getN() or
result = e.(Bytes).getS() or
result = e.(Unicode).getS()
}
from ImmutableLiteral l
where not exists(l.getLiteralObject())
select l.getLocation().getStartLine(), repr(l)