Skip to content

Commit cd646c8

Browse files
committed
explain instanceof extensions via charpred instanceof
1 parent 35b0e83 commit cd646c8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

docs/codeql/ql-language-reference/types.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -388,6 +388,8 @@ Non-extending subtypes
388388
======================
389389

390390
Besides extending base types, classes can also declare `instanceof` relationships with other types.
391+
Declaring a class as `instanceof Foo` is roughly equivalent to saying `this instanceof Foo` the charpred.
392+
The main differences are that you can call methods on Bar via `super` and you can get better optimisation.
391393

392394
.. code-block:: ql
393395

0 commit comments

Comments
 (0)