Closed jotapero closed 2 years ago
Provided code does not run, is it on purpose?
class Rectangle { double left, top, width, height; Rectangle(this.left, this.top, this.width, this.height); double get right => this.left + this.width; set left(double value) { if (value >= 0) { this.left = value; } else { throw new FormatException(); } } double get bottom => this.top - this.height; } void main() { var rect = Rectangle(3, 4, 20, 15); rect.left = 12; }
you are right, it is being fixed
Note 1
Provided code does not run, is it on purpose?