Skip to content

Commit c06b8a6

Browse files
subatoifelicitymay
andauthored
Update docs/codeql/reusables/kotlin-java-differences.rst
Co-authored-by: Felicity Chapman <[email protected]>
1 parent c663da5 commit c06b8a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/codeql/reusables/kotlin-java-differences.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Writing CodeQL queries for Kotlin versus Java analysis
33

44
When writing Kotlin-specific elements (such as a `WhenExpr`) you’ll need to use Kotlin-specific CodeQL classes, but writing queries for Kotlin and Java is largely the same. The two make use of the same libraries such as DataFlow, TaintTracking, or SSA, and the same classes such as `MethodAccess` or `Class`.
55

6-
There are however some important cases where writing queries for Kotlin can produce surprising results compared to writing Java queries, as CodeQL works with the JVM bytecode representation of the source code.
6+
There are however some important cases where writing queries for Kotlin can produce surprising results compared to writing queries for Java, as CodeQL works with the JVM bytecode representation of the Kotlin source code.
77

88
Be careful when you model code elements that don’t exist in Java, such as ``NotNullExpr (expr!!)``, because they could interact in unexpected ways with common predicates. For example, ``MethodAccess.getQualifier()`` returns a ``NotNullExpr`` instead of a ``VarAccess`` in the following Kotlin code:
99

0 commit comments

Comments
 (0)