blob: 1bcd398d6e1da8479147b527387e88275bff806d [file] [log] [blame]
// @dart = 2.9
class MapLike<K, V> {
final Map<K, V> _map = {};
V get(Object key) => _map[key];
V put(K key, V value) => _map[key] = value;
}
extension Extension<K, V> on MapLike<K, V> {
V operator [](Object key) => get(key);
void operator []=(K key, V value) => put(key, value);
}
main() {}
implicit() {}
explicitWithTypeArguments() {}
explicitInferredTypeArguments() {}
expect(expected, actual) {}