class Test
{
final int _x;
final int _y;
int get x => _x + 7;
int get y => 8;
Test.forThing(this._x, this._y);
}
abstract class Tester
{
int get y;
}
class Jim implements Test, Tester
{
int get x => 7;
Jim();
}
void main() {
Test bob = new Test.forThing(1, 2);
Test jim = new Jim();
print(jim.y);
}
Lets say we have the above code.
Now, I can understand not forcing Jim to implement all methods of Test (after all, it may only use 1 or 2 of those methods.) However, it looks like the fact that jim calls the y getter should have immediately thrown a compile time error since Jim doesn't implement a y getter.
Does that sound too crazy? I just prefer the compile time errors to runtime errors. I don't know how complex it would be to check that, but I think it might be worth it.