Kotlin: Mention Literal::getLiteral() difference from source code

It appears the Kotlin extractor does not have access to the actual
string representation in the source code, and for most literal types
uses simply the represented value also as `getLiteral` result, see
https://github.com/github/codeql/blob/codeql-cli/v2.15.1/java/kotlin-extractor/src/main/kotlin/KotlinFileExtractor.kt#L4443
This commit is contained in:
Marcono1234
2023-10-25 02:04:54 +02:00
committed by GitHub
parent 12d0f1a84b
commit bf20b8e5a5

View File

@@ -530,6 +530,9 @@ class Literal extends Expr, @literal {
* Gets a string representation of this literal as it appeared
* in the source code.
*
* For Kotlin the result might not match the exact representation
* used in the source code.
*
* **Important:** Unless a query explicitly wants to check how
* a literal was written in the source code, the predicate
* `getValue()` (or value predicates of subclasses) should be