Skip to content

Commit

Permalink
Merge pull request flutter#68 from dart-lang/preview_dart_2_fix
Browse files Browse the repository at this point in the history
fix an issue when run with --preview-dart-2
  • Loading branch information
devoncarew authored Mar 10, 2018
2 parents 50e04c7 + 9dd8d8d commit b7093f1
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Don’t commit the following directories created by pub.
.pub
.dart_tool/
build/
packages
.packages
Expand Down
15 changes: 10 additions & 5 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
## 0.13.3

* Update the signatures of `FilteredElementList.indexOf` and
`FilteredElementList.lastIndexOf` to include type annotations.

## 0.13.2+2

* Update signature for implementations of `Iterable.singleWhere` to include
optional argument.
* Update signature for implementations of `Iterable.singleWhere` to include
optional argument.

## 0.13.2+1

* Changed the implementation of `Set` and `List` classes to use base classes
from `dart:collection`.
* Changed the implementation of `Set` and `List` classes to use base classes
from `dart:collection`.

## 0.13.2

Expand Down
5 changes: 3 additions & 2 deletions lib/dom.dart
Original file line number Diff line number Diff line change
Expand Up @@ -969,11 +969,12 @@ class FilteredElementList extends IterableBase<Element>
_filtered.getRange(start, end);
// TODO(sigmund): this should be typed Element, but we currently run into a
// bug where ListMixin<E>.indexOf() expects Object as the argument.
int indexOf(element, [int start = 0]) => _filtered.indexOf(element, start);
int indexOf(Object element, [int start = 0]) =>
_filtered.indexOf(element, start);

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

0 comments on commit b7093f1

Please sign in to comment.