diff --git a/CHANGELOG.md b/CHANGELOG.md index 8ed506025a051..a23eebde7943c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 1.6.3 + +* Make `Chain.capture()` generic. Its signature is now `T Chain.capture(T + callback(), ...)`. + ## 1.6.2 * Fix all strong mode warnings. diff --git a/lib/src/chain.dart b/lib/src/chain.dart index b6f36d20efa9c..b436651297619 100644 --- a/lib/src/chain.dart +++ b/lib/src/chain.dart @@ -68,8 +68,8 @@ class Chain implements StackTrace { /// considered unhandled. /// /// If [callback] returns a value, it will be returned by [capture] as well. - static capture(callback(), {void onError(error, Chain chain), - bool when: true}) { + static /*=T*? capture/**/(/*=T*/ callback(), + {void onError(error, Chain chain), bool when: true}) { if (!when) { var newOnError; if (onError != null) { diff --git a/pubspec.yaml b/pubspec.yaml index 465011b21a4de..ce1d39d5f5247 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -7,7 +7,7 @@ name: stack_trace # # When the major version is upgraded, you *must* update that version constraint # in pub to stay in sync with this. -version: 1.6.2 +version: 1.6.3 author: "Dart Team " homepage: http://github.com/dart-lang/stack_trace description: >