Files
codeql/python/ql/test/library-tests/objects/Literals.ql
2018-11-19 15:15:54 +00:00

16 lines
328 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)