mirror of
https://github.com/apple/pkl.git
synced 2026-03-11 21:05:26 +01:00
[docs] Improve searchability of "Methods" section (#625)
This commit is contained in:
@@ -2006,7 +2006,8 @@ pigeon: ParentBird = new {
|
||||
[[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.
|
||||
|
||||
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