Skip to content

Commit

Permalink
Add methods to Set and Map which are needed for Linter
Browse files Browse the repository at this point in the history
Bug: https://github.com/dart-lang/linter/issues/1307
Change-Id: Ia62aa7715509a45eb9fb0feb48c58ffee551db34
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/259506
Commit-Queue: Samuel Rawlins <srawlins@google.com>
Reviewed-by: Phil Quitslund <pquitslund@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
  • Loading branch information
srawlins authored and Commit Bot committed Sep 19, 2022
1 parent 27f4d28 commit fb29df7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion pkg/analyzer/lib/src/test_utilities/mock_sdk.dart
Original file line number Diff line number Diff line change
Expand Up @@ -499,8 +499,10 @@ abstract class Map<K, V> {
void addAll(Map<K, V> other);
Map<RK, RV> cast<RK, RV>();
bool containsKey(Object? key);
bool containsValue(Object? value);
void forEach(void action(K key, V value));
V putIfAbsent(K key, V ifAbsent());
V? remove(Object? key);
}
class Null extends Object {
Expand Down Expand Up @@ -595,8 +597,13 @@ abstract class Set<E> implements Iterable<E> {
bool add(E value);
void addAll(Iterable<E> elements);
bool remove(Object? value);
bool containsAll(Iterable<Object?> other);
Set<E> difference(Set<Object?> other);
Set<E> intersection(Set<Object?> other);
E? lookup(Object? object);
bool remove(Object? value);
void removeAll(Iterable<Object?> elements);
void retainAll(Iterable<Object?> elements);
static Set<T> castFrom<S, T>(Set<S> source, {Set<R> Function<R>()? newSet}) =>
throw '';
Expand Down

0 comments on commit fb29df7

Please sign in to comment.