Fix syntax bugs
This commit is contained in:
@@ -40,17 +40,17 @@ class Dog : Animal {
|
||||
super(name);
|
||||
}
|
||||
|
||||
override void speak(&self)
|
||||
void speak(&self) override
|
||||
{
|
||||
println!("Woof!");
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
The `override` keyword supports explicit base class targeting:
|
||||
The `override` keyword supports explicit base class targeting (Required if overriding a nested parent):
|
||||
|
||||
```mist
|
||||
override(Animal) void speak(&self)
|
||||
void speak(&self) override(Animal)
|
||||
{
|
||||
println!("Woof!");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user