Skip to content

Commit 83b690b

Browse files
a-sivanex3
authored andcommitted
Work around a CFE inference bug (#5)
Annotate the type of All.variables and None.variables to work around dart-lang/sdk#32412.
1 parent 608ef40 commit 83b690b

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 1.0.3
2+
3+
* Work around an inference bug in the new common front-end.
4+
15
## 1.0.2
26

37
* Declare compatibility with `string_scanner` 1.0.0.

lib/src/all.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import '../boolean_selector.dart';
66

77
/// A selector that matches all inputs.
88
class All implements BooleanSelector {
9-
final variables = const [];
9+
// TODO(nweiz): Stop explicitly providing a type argument when sdk#32412 is
10+
// fixed.
11+
final variables = const <String>[];
1012

1113
const All();
1214

lib/src/none.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import '../boolean_selector.dart';
66

77
/// A selector that matches no inputs.
88
class None implements BooleanSelector {
9-
final variables = const [];
9+
// TODO(nweiz): Stop explicitly providing a type argument when sdk#32412 is
10+
// fixed.
11+
final variables = const <String>[];
1012

1113
const None();
1214

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: boolean_selector
2-
version: 1.0.3-dev
2+
version: 1.0.3
33
description: A flexible syntax for boolean expressions.
44
author: Dart Team <[email protected]>
55
homepage: https://github.com/dart-lang/boolean_selector

0 commit comments

Comments
 (0)