Skip to content

Commit 35b0e83

Browse files
committed
simpler first instanceof extension example
1 parent 6e02518 commit 35b0e83

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,8 @@ Besides extending base types, classes can also declare `instanceof` relationship
397397
string foo_method() { result = "foo" }
398398
}
399399
400-
class Bar extends int instanceof Foo {
401-
string bar_method() { result = super.foo_method() }
400+
class Bar instanceof Foo {
401+
string toString() { result = super.foo_method() }
402402
}
403403
404404
In this example, the characteristic predicate from `Foo` also applies to `Bar`.

0 commit comments

Comments
 (0)