Add TextWriter, IOException, per-VM module data and pre-load imports; Add console module with Console class
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import 'console';
|
||||
interface iVehicle {
|
||||
|
||||
public void drive();
|
||||
@@ -8,11 +9,11 @@ interface iVehicle {
|
||||
class Car implements iVehicle {
|
||||
|
||||
public void drive() {
|
||||
print("Driving...\n");
|
||||
Console::Print("Driving...\n");
|
||||
}
|
||||
|
||||
public void stop() {
|
||||
print("Stopping...\n");
|
||||
Console::Print("Stopping...\n");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -20,7 +21,7 @@ class Car implements iVehicle {
|
||||
class MyCar extends Car {
|
||||
|
||||
public void drive() {
|
||||
print("Driving my car...\n");
|
||||
Console::Print("Driving my car...\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user