Refactor matchState initialization to use untyped literal (#349) Fixes a regression in async matchers that could lead to type errors in tests.
diff --git a/CHANGELOG.md b/CHANGELOG.md index efdb8bf..f2de76c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md
@@ -1,3 +1,8 @@ +## 3.2.1 + +* Fix a potential regression in async matchers that could cause type error when + providing values to matchers in tests. + ## 3.2.0 * Require Dart 3.4 and add a dependency on `package:web`.
diff --git a/lib/support/async.dart b/lib/support/async.dart index 52f79c1..5eeb8d8 100644 --- a/lib/support/async.dart +++ b/lib/support/async.dart
@@ -78,7 +78,8 @@ } void _matcherExpect(Object? value, m.Matcher matcher, String? reason) { - final matchState = <String, Object?>{}; + // ignore: inference_failure_on_collection_literal + final matchState = {}; if (matcher.matches(value, matchState)) { return; }
diff --git a/pubspec.yaml b/pubspec.yaml index a9d1092..7fedf64 100644 --- a/pubspec.yaml +++ b/pubspec.yaml
@@ -1,5 +1,5 @@ name: webdriver -version: 3.2.0 +version: 3.2.1 description: >- Provides WebDriver bindings for Dart. Supports WebDriver JSON interface and W3C spec. Requires the use of WebDriver remote server.