sdk
sdk copied to clipboard
Should pkg/meta's @alwaysThrows be deprecated for Dart v3?
My understanding is that, similar to pkg/meta's @required, @alwaysThrows has no use in Dart v3:
// Dart v2 before null-safety
import 'package:meta/meta.dart';
@alwaysThrows
void a() => throw 'Always throws';
// Dart v2 after null-safety
Never a() => throw 'Always throws';
Anyone, not sure... figured I'd highlight this for others to look at.
That's probably reasonable. The only place I can think of where the annotation can be used that Never can't be used is on a setter, but it seems highly unlikely that anyone's using the annotation on a setter.
Oops, done.