mirror of
https://github.com/apple/pkl.git
synced 2026-04-23 00:38:37 +02:00
[docs] Improve searchability of "Methods" section (#625)
This commit is contained in:
@@ -2006,7 +2006,8 @@ pigeon: ParentBird = new {
|
|||||||
[[methods]]
|
[[methods]]
|
||||||
== Methods
|
== Methods
|
||||||
|
|
||||||
Modules and classes can define methods.
|
Pkl methods can be defined on classes and modules using the `function` keyword.
|
||||||
|
Methods may access properties of their containing type.
|
||||||
Submodules and subclasses can override them.
|
Submodules and subclasses can override them.
|
||||||
|
|
||||||
Like Java and most other object-oriented languages, Pkl uses _single dispatch_ -- methods are dynamically dispatched based on the receiver's runtime type.
|
Like Java and most other object-oriented languages, Pkl uses _single dispatch_ -- methods are dynamically dispatched based on the receiver's runtime type.
|
||||||
|
|||||||
Reference in New Issue
Block a user