Chromium Code Reviews| Index: pkg/meta/CHANGELOG.md |
| diff --git a/pkg/meta/CHANGELOG.md b/pkg/meta/CHANGELOG.md |
| index b91da1c7795f71cba1db4c6f83eaaec0fa62ffae..136dff26314b2696acf9987cf0b048ab81bb8262 100644 |
| --- a/pkg/meta/CHANGELOG.md |
| +++ b/pkg/meta/CHANGELOG.md |
| @@ -1,3 +1,26 @@ |
| +## 1.1.0 |
| +* Introduce `@alwaysThrows` to declare that a function always throws |
| + (SDK issue [17999](https://github.com/dart-lang/sdk/issues/17999)). |
|
nweiz
2017/07/10 20:47:46
It would be good to mention which SDK version firs
srawlins
2017/07/10 21:39:13
Done.
|
| + |
| + |
| + ```dart |
| + import 'package:meta/meta.dart' show alwaysThrows; |
|
nweiz
2017/07/10 20:47:46
I wouldn't use "show" here.
srawlins
2017/07/10 21:39:13
I was following the conventions of the previous tw
nweiz
2017/07/10 21:46:41
A few teams do it, but it's not generally a conven
|
| + // Without knowing that [failBigTime] always throws, it looks like this |
|
nweiz
2017/07/10 20:47:46
Nit: newline between these lines.
srawlins
2017/07/10 21:39:13
Done.
|
| + // function might return without returning a bool. |
| + bool fn(expected, actual) { |
| + if (expected != actual) |
| + failBigTime(expected, actual); |
| + else |
| + return True; |
| + } |
| + |
| + |
|
nweiz
2017/07/10 20:47:46
Nit: extra newline.
srawlins
2017/07/10 21:39:13
Done.
|
| + @alwaysThrows |
| + void failBigTime(expected, actual) { |
| + throw new StateError('Expected $expected, but was $actual.'); |
| + } |
| + ``` |
| + |
| ## 1.0.4 |
| * Introduce `@virtual` to allow field overrides in strong mode |
| (SDK issue [27384](https://github.com/dart-lang/sdk/issues/27384)). |