buzz
buzz copied to clipboard
`Self` as reference to current object type
Not really useful in an object declaration since we can self reference there, but useful in protocols where we want to reference the actual object type.
protocol Clonable {
fun clone() > Self;
}
object(Clonable) Person {
str name,
fun clone() > Self {
return Person { name = this.name };
}
}