2
我認爲以下是正確的,但try.dart發出錯誤。Dart,try.dart使用Mixins給出錯誤
abstract class Persistence{
void save(String stuffToSave){
print('Saved ' + stuffToSave);
}
}
class Car {
String model;
int speed;
Car(this.model, this.speed);
void accelerate(int increase){
this.speed+=increase;
}
}
class Truck extends Car with Persistence {
Truck(String model, int speed):super(model, speed);
}
main(){
Truck myTruck = new Truck('big truck', 0);
}
以下是錯誤:
完成它。 https://code.google.com/p/dart/issues/detail?id=15908 –