Skip to content

Commit dcd082e

Browse files
committed
Possible build fix, else needs new parameter
1 parent 40c2b3c commit dcd082e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ There are however some important cases where writing queries for Kotlin can prod
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

1010
.. code-block:: kotlin
11+
1112
someVar!!.someMethodCall()
1213
1314
In that specific case, you can use the predicate `Expr.getUnderlyingExpr()`. This goes directly to the underlying `VarAccess`` to produce a more similar behavior to that in Java.

0 commit comments

Comments
 (0)