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

Co-authored-by: Felicity Chapman <felicitymay@github.com>
This commit is contained in:
Ben Ahmady
2022-11-23 10:07:03 +00:00
committed by GitHub
parent 4bd7e24b5f
commit c663da5be6

View File

@@ -5,7 +5,7 @@ When writing Kotlin-specific elements (such as a `WhenExpr`) youll need to us
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.
Be careful when trying to model code elements that dont exist in Java, such as `NotNullExpr (expr!!)`, because they could interact in unexpected ways with common predicates. For example, `MethodAccess.getQualifier()` gets a `NotNullExpr `instead of a `VarAccess`` in the following Kotlin code:
Be careful when you model code elements that dont 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:
.. code-block:: kotlin
someVar!!.someMethodCall()