File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
docs/codeql/ql-language-reference Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -382,7 +382,6 @@ from ``OneTwoThree`` and ``int``.
382
382
must :ref: `override <overriding-member-predicates >` those definitions to avoid ambiguity.
383
383
:ref: `Super expressions <super >` are often useful in this situation.
384
384
385
-
386
385
.. _instanceof-extensions :
387
386
388
387
Non-extending subtypes
@@ -391,6 +390,7 @@ Non-extending subtypes
391
390
Besides extending base types, classes can also declare `instanceof ` relationships with other types.
392
391
393
392
.. code-block :: ql
393
+
394
394
class Foo extends int {
395
395
Foo() { this in [1 .. 10] }
396
396
@@ -410,8 +410,8 @@ Crucially, the base class methods are not just hidden. The extension relationshi
410
410
This has deep implications on method resolution when complex class hierarchies are involved.
411
411
The following example demonstrates this.
412
412
413
-
414
413
.. code-block :: ql
414
+
415
415
class Interface extends int {
416
416
Interface() { this in [1 .. 100] }
417
417
string foo() { result = "" }
@@ -431,7 +431,6 @@ Instead, it overrides only `Interface::foo`.
431
431
This means that `select any(Foo b).foo() ` yields only `foo `.
432
432
Had `bar been defined as `extends Foo `, then `select any(Foo b).foo() ` would yield `bar `.
433
433
434
-
435
434
.. _character-types :
436
435
.. _domain-types :
437
436
You can’t perform that action at this time.
0 commit comments