You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Inside constructors, we need to be able to call superclass constructors. This should use syntax similar to #11.
Proposed syntax:
class a {
new(int x) {}
}
class b {
new(string y) {}
}
class c : a,b {
new() {
new(42);
}
new(int z) {
// note that we can have statements before super-constructor calls,
// and said calls are optional, anyways.
// We'll issue a warning if not all superclasses have their constructors called for certain.
@super new(z);
@super(class b) new(z.toString());
}
}
The text was updated successfully, but these errors were encountered:
Inside constructors, we need to be able to call superclass constructors. This should use syntax similar to #11.
Proposed syntax:
The text was updated successfully, but these errors were encountered: