cf0e927a43
SharedType and its subtypes now all declare one recursive type variable Type with the bound SharedType<Type>. It allows to treate SharedType and its subtypes as an abstract familty of types that has a specific structure. More specifically, the type variables Type and TypeSchema in the abstract classes for shared algorithms between the Analyzer and the CFE can now be defined recursively as extending SharedType<Type> and SharedType<TypeSchema>, giving both types and type schemas the structure of the family of types with the root at SharedType. One of the benefits for that is that some abstract members become unnecessary. For example, a type or type schema can now be tested for having the shape of the type 'dynamic' with a direct is-check, comparing them, correspondingly, with SharedType<Type> and SharedType<TypeSchema>. More importantly, having the family of recursive types lays the foundation for further work on sharing the type structure between the Analyzer and the CFE. Change-Id: I67904f878668c035702092e8c21d3ce66f5ca469 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/378700 Reviewed-by: Paul Berry <paulberry@google.com> Commit-Queue: Chloe Stefantsova <cstefantsova@google.com>