-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
FeatureThis issue or PR contains a new feature.This issue or PR contains a new feature.FutureThis issue or PR is something that will be added in the future.This issue or PR is something that will be added in the future.High PriorityHigh profile, important issue that needs to be focused onHigh profile, important issue that needs to be focused on
Description
Typesharp will allow multilevel inheritance, aka you will be able to inherit multiple classes by abstraction with the as keyword on super.
Ex:
class TaxiRides extends Queue<Ride>, Date, Mutex {
public constructor() {
super(); // Queue
super as Date();
super as Mutex();
}
}
// Where queue is:
class Queue<T> {
private next_in_list: T[];
public constructor() {
this.next_in_list = [];
}
public function queue(item: T): void {
this.next_in_list.add(item);
}
public function dequeue(): T? {
return this.next_in_list.shift() || null;
}
}Metadata
Metadata
Assignees
Labels
FeatureThis issue or PR contains a new feature.This issue or PR contains a new feature.FutureThis issue or PR is something that will be added in the future.This issue or PR is something that will be added in the future.High PriorityHigh profile, important issue that needs to be focused onHigh profile, important issue that needs to be focused on