mirror of
https://github.com/github/codeql.git
synced 2026-04-21 06:55:31 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user