Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(439)

Unified Diff: lib/src/util.dart

Issue 1834543002: Fix all strong-mode warnings. (Closed) Base URL: git@github.com:dart-lang/matcher@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/operator_matchers.dart ('k') | pubspec.yaml » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/util.dart
diff --git a/lib/src/util.dart b/lib/src/util.dart
index 87060097d04a736f66d22d00f6c9984c35784eeb..a6b3ab4b5c8111911e08edcd9c18807c8bb7ffce 100644
--- a/lib/src/util.dart
+++ b/lib/src/util.dart
@@ -7,6 +7,8 @@ library matcher.util;
import 'core_matchers.dart';
import 'interfaces.dart';
+typedef bool _Predicate(value);
+
/// A [Map] between whitespace characters and their escape sequences.
const _escapeMap = const {
'\n': r'\n',
@@ -38,7 +40,7 @@ void addStateInfo(Map matchState, Map values) {
Matcher wrapMatcher(x) {
if (x is Matcher) {
return x;
- } else if (x is Function) {
+ } else if (x is _Predicate) {
return predicate(x);
} else {
return equals(x);
« no previous file with comments | « lib/src/operator_matchers.dart ('k') | pubspec.yaml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698