blob: a2668782cc4221d62a71bb7d64c78f5fd9f59384 [file] [log] [blame]
import "dart:collection";
String soundResult = "[key1];" "[key2];";
String test1(Object o) {}
String test2(Object o) => switch (o) {
<String, int>{"key1": 1, "key2": 3} => "match-2",
<String, int>{"key1": 1, "key2": 2} => "match-3",
_ => "no match"
};
String unsoundResult =
"containsKey(key1);" "[key1];" "containsKey(key2);" "[key2];";
bool get hasUnsoundNullSafety => const <Null>[] is List<Object>;
class MyMap<K, V> extends MapBase<K, V> {
@override
Iterable<K> get keys {}
Map<K, V> _inner;
MyMap(this._inner);
String log = "";
@override
bool containsKey(Object? key) {}
@override
int get length {}
@override
operator [](Object? key) {}
@override
remove(Object? key) {}
@override
void clear() {}
void clearLog() {}
@override
void operator []=(key, value) {}
}
expect(expected, actual) {}
main() {}