Skip to content

Commit b7093f1

Browse files
authored
Merge pull request flutter#68 from dart-lang/preview_dart_2_fix
fix an issue when run with --preview-dart-2
2 parents 50e04c7 + 9dd8d8d commit b7093f1

File tree

3 files changed

+14
-7
lines changed

3 files changed

+14
-7
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Don’t commit the following directories created by pub.
22
.pub
3+
.dart_tool/
34
build/
45
packages
56
.packages

CHANGELOG.md

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1+
## 0.13.3
2+
3+
* Update the signatures of `FilteredElementList.indexOf` and
4+
`FilteredElementList.lastIndexOf` to include type annotations.
5+
16
## 0.13.2+2
27

3-
* Update signature for implementations of `Iterable.singleWhere` to include
4-
optional argument.
5-
8+
* Update signature for implementations of `Iterable.singleWhere` to include
9+
optional argument.
10+
611
## 0.13.2+1
712

8-
* Changed the implementation of `Set` and `List` classes to use base classes
9-
from `dart:collection`.
13+
* Changed the implementation of `Set` and `List` classes to use base classes
14+
from `dart:collection`.
1015

1116
## 0.13.2
1217

lib/dom.dart

+3-2
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,12 @@ class FilteredElementList extends IterableBase<Element>
969969
_filtered.getRange(start, end);
970970
// TODO(sigmund): this should be typed Element, but we currently run into a
971971
// bug where ListMixin<E>.indexOf() expects Object as the argument.
972-
int indexOf(element, [int start = 0]) => _filtered.indexOf(element, start);
972+
int indexOf(Object element, [int start = 0]) =>
973+
_filtered.indexOf(element, start);
973974

974975
// TODO(sigmund): this should be typed Element, but we currently run into a
975976
// bug where ListMixin<E>.lastIndexOf() expects Object as the argument.
976-
int lastIndexOf(element, [int start]) {
977+
int lastIndexOf(Object element, [int start]) {
977978
if (start == null) start = length - 1;
978979
return _filtered.lastIndexOf(element, start);
979980
}

0 commit comments

Comments
 (0)