From 099f8fe21706ebc130ae2e462fa239e8c5c97306 Mon Sep 17 00:00:00 2001 From: Natalie Weizenbaum Date: Mon, 28 Mar 2016 14:32:04 -0700 Subject: [PATCH] Make Chain.capture() generic. Closes #10 R=rnystrom@google.com, jmesserly@google.com Review URL: https://codereview.chromium.org//1834283003 . --- CHANGELOG.md | 5 +++++ lib/src/chain.dart | 4 ++-- pubspec.yaml | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) 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: >