Closed
Description
Tried this:
class Point {
final int x;
final int y;
Point(this.x, this.y);
}
void main() {
final (:x, :y) = Point(1, 5);
print('$x, $y');
}
Got:
The matched value of type 'Point' isn't assignable to the required type '({Object? x, Object? y})'.
Try changing the required type of the pattern, or the matched value type.dart(pattern_type_mismatch_in_irrefutable_context)