Issue #25472: In B[<type>], insert B in front of __bases__, to make the __dict__ descriptor work.
diff --git a/Lib/typing.py b/Lib/typing.py
index d900036..49c4a06 100644
--- a/Lib/typing.py
+++ b/Lib/typing.py
@@ -981,7 +981,7 @@
                         "Cannot substitute %s for %s in %s" %
                         (_type_repr(new), _type_repr(old), self))
 
-        return self.__class__(self.__name__, self.__bases__,
+        return self.__class__(self.__name__, (self,) + self.__bases__,
                               dict(self.__dict__),
                               parameters=params,
                               origin=self,