anchor.diff:  
   typedef _Predicate<T> = bool Function(T value);
   
  -class _SplayTreeNodeBase<K> {
  +/// A node in a splay tree. It holds the sorting key and the left
  +/// and right children in the tree.
  +class _SplayTreeNode<K> {
  +  // The key is nullable to be able to create a dummy node.
  +  final K? _key;
  +
     _SplayTreeNode<K>? left;
     _SplayTreeNode<K>? right;
  -}
  -
  -/// A node in a splay tree. It holds the sorting key and the left
  -/// and right children in the tree.
  -class _SplayTreeNode<K> extends _SplayTreeNodeBase<K> {
  -  final K key;
  -
  -  _SplayTreeNode(this.key);
  -}
  -
  -class _DummySplayTreeNode<K> extends _SplayTreeNodeBase<K>
  -    implements _SplayTreeNode<K> {
  -  K get key => throw UnsupportedError("");
  +
  +  _SplayTreeNode(this._key);
  +
  +  K get key {
  +    // TODO(dartbug.com/40892): replace with '_key as K'
  +    K? localKey = _key;
  +    return (localKey != null) ? localKey : localKey as K;
  +  }
   }
   
   /// A node in a splay tree based map.
   ///
   /// A [_SplayTreeNode] that also contains a value
   class _SplayTreeMapNode<K, V> extends _SplayTreeNode<K> {
  -  V value;
  -  _SplayTreeMapNode(K key, this.value) : super(key);
  -}
  -
  -class _DummySplayTreeMapNode<K, V> extends _DummySplayTreeNode<K>
  -    implements _SplayTreeMapNode<K, V> {
  -  V get value => throw UnsupportedError("");
  -  set value(V v) => throw UnsupportedError("");
  +  // The value is nullable to be able to create a dummy node.
  +  V? _value;
  +
  +  _SplayTreeMapNode(K? key, this._value) : super(key);
  +
  +  V get value {
  +    // TODO(dartbug.com/40892): replace with '_value as V'
  +    V? localValue = _value;
  +    return (localValue != null) ? localValue : localValue as V;
  +  }
   }
   
   /// A splay tree is a self-balancing binary search tree.
  
positive.code:     // the key to the root of the tree.
      int comp = _splay(key);
      if (comp == 0) {
        _root!.value = value;
        return;
      }
      _addNewRoot(_SplayTreeMapNode(key, value), comp);
  
negative.code: class SplayTreeSet<E> extends _SplayTree<E, _SplayTreeNode<E>>
      with IterableMixin<E>, SetMixin<E> {
    _SplayTreeNode<E>? _root;
    final _SplayTreeNode<E> _dummy = _SplayTreeNode<E>(null);
  
    Comparator<E> _comparator;
    _Predicate _validKey;
  