From e1e100306a6ec9b20d558d8c3c74d7116a9cf38d Mon Sep 17 00:00:00 2001 From: Sam Rawlins Date: Mon, 8 Jan 2018 14:24:13 -0800 Subject: [PATCH] Self-execute closures for assert() --- lib/src/differs/list_differ.dart | 2 +- lib/src/internal.dart | 2 +- lib/src/records/list_change_record.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/differs/list_differ.dart b/lib/src/differs/list_differ.dart index bcb0dfd..ab0e5c2 100644 --- a/lib/src/differs/list_differ.dart +++ b/lib/src/differs/list_differ.dart @@ -306,7 +306,7 @@ List> _calcSplices( assert(() { splices = new List>.unmodifiable(splices); return true; - }); + }()); return splices; } diff --git a/lib/src/internal.dart b/lib/src/internal.dart index 780e317..d600f50 100644 --- a/lib/src/internal.dart +++ b/lib/src/internal.dart @@ -7,6 +7,6 @@ List freezeInDevMode(List list) { assert(() { list = new List.unmodifiable(list); return true; - }); + }()); return list; } diff --git a/lib/src/records/list_change_record.dart b/lib/src/records/list_change_record.dart index 8b8c41e..0ebdb43 100644 --- a/lib/src/records/list_change_record.dart +++ b/lib/src/records/list_change_record.dart @@ -95,7 +95,7 @@ class ListChangeRecord implements ChangeRecord { throw new ArgumentError('Invalid `addedCount`: $addedCount'); } return true; - }); + }()); } /// Returns whether [reference] index was changed in this operation.