mirror of
https://github.com/leafo/moonscript.git
synced 2024-12-08 01:54:24 +00:00
mentioned function stubs and super
This commit is contained in:
parent
3e9c5669a3
commit
676e89454d
@ -639,6 +639,10 @@ A few examples of using `super` in different ways:
|
|||||||
-- super as a value is equal to the parent class:
|
-- super as a value is equal to the parent class:
|
||||||
assert super == ParentClass
|
assert super == ParentClass
|
||||||
|
|
||||||
|
`super` can also be used on left side of a [Function Stub](#function_stubs).
|
||||||
|
The only major difference is that instead of the resulting function being bound
|
||||||
|
to the value of `super`, it is bound to `self`.
|
||||||
|
|
||||||
### Types
|
### Types
|
||||||
|
|
||||||
Every instance of a class carries its type with it. This is stored in the
|
Every instance of a class carries its type with it. This is stored in the
|
||||||
|
Loading…
Reference in New Issue
Block a user