Skip to content

Commit b1525bc

Browse files
srawlinsCommit Queue
authored andcommitted
Deprecate alwaysThrows
Fixes #49583 Change-Id: Icc10dbba642703098708202537c733ff1d48b9db Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/279651 Commit-Queue: Samuel Rawlins <srawlins@google.com> Reviewed-by: Phil Quitslund <pquitslund@google.com>
1 parent 991adea commit b1525bc

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/meta/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
extend classes marked `base`, `final` or `interface`.
55
* Introduce `@MustBeOverridden` to annotate class or mixin members which must be
66
overridden in all subclasses.
7+
* Deprecate `@alwaysThrows`, which can be replaced by using a return type of
8+
'Never'.
79

810
## 1.8.0
911

pkg/meta/lib/meta.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ import 'meta_meta.dart';
5151
/// Tools, such as the analyzer, can also expect this contract to be enforced;
5252
/// that is, tools may emit warnings if a function with this annotation
5353
/// _doesn't_ always throw.
54+
@Deprecated("Use a return type of 'Never' instead")
5455
const _AlwaysThrows alwaysThrows = _AlwaysThrows();
5556

5657
/// Used to annotate a parameter of an instance method that overrides another

0 commit comments

Comments
 (0)