| 1 |
# `class` extends RefCounted by default. |
| 2 |
class Say: |
| 3 |
func say(): |
| 4 |
super() |
| 5 |
print("say something") |
| 6 |
|
| 7 |
|
| 8 |
func test(): |
| 9 |
# RefCounted doesn't have a `say()` method, so the `super()` call in the method |
| 10 |
# definition will cause a run-time error. |
| 11 |
Say.new().say() |