[analyzer][cfe] Make SharedType into a family of recursive types
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>
diff --git a/pkg/_fe_analyzer_shared/lib/src/type_inference/shared_inference_log.dart b/pkg/_fe_analyzer_shared/lib/src/type_inference/shared_inference_log.dart
index 215cab7..d99c777 100644
--- a/pkg/_fe_analyzer_shared/lib/src/type_inference/shared_inference_log.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/type_inference/shared_inference_log.dart
@@ -121,7 +121,7 @@
/// This class defines methods that the analyzer or CFE can use to instrument
/// their type inference logic. The implementations are found in
/// [SharedInferenceLogWriterImpl].
-abstract interface class SharedInferenceLogWriter<Type extends SharedType,
+abstract interface class SharedInferenceLogWriter<Type extends SharedType<Type>,
TypeParameter extends Object> {
/// If [inProgress] is `true`, verifies that generic type inference is in
/// progress; otherwise, verifies that generic type inference is not in
@@ -266,7 +266,7 @@
/// from classes derived from [SharedInferenceLogWriterImpl], but these methods
/// are not exposed in [SharedInferenceLogWriter] so that they won't be called
/// accidentally on their own.
-abstract class SharedInferenceLogWriterImpl<Type extends SharedType,
+abstract class SharedInferenceLogWriterImpl<Type extends SharedType<Type>,
TypeParameter extends Object>
implements SharedInferenceLogWriter<Type, TypeParameter> {
/// A stack of [State] objects representing the calls that have been made to
diff --git a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart
index 90d6818..93e847d 100644
--- a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer.dart
@@ -130,7 +130,7 @@
}
/// Information about a relational operator.
-class RelationalOperatorResolution<Type extends SharedType> {
+class RelationalOperatorResolution<Type extends SharedType<Type>> {
final RelationalOperatorKind kind;
final Type parameterType;
final Type returnType;
@@ -265,10 +265,10 @@
Statement extends Node,
Expression extends Node,
Variable extends Object,
- Type extends SharedType,
+ Type extends SharedType<Type>,
Pattern extends Node,
Error,
- TypeSchema extends Object,
+ TypeSchema extends SharedType<TypeSchema>,
InferableParameter extends Object,
TypeDeclarationType extends Object,
TypeDeclaration extends Object> {
@@ -540,7 +540,7 @@
/// Stack effect: pushes (Expression).
Type analyzeExpression(Expression node, TypeSchema schema) {
// Stack: ()
- if (operations.typeSchemaIsDynamic(schema)) {
+ if (schema is SharedDynamicType<TypeSchema>) {
schema = operations.unknownType;
}
ExpressionTypeAnalysisResult<Type> result =
@@ -2516,7 +2516,7 @@
Statement extends Node,
Expression extends Node,
Variable extends Object,
- Type extends SharedType,
+ Type extends SharedType<Type>,
Pattern extends Node,
Error> implements TypeAnalyzerErrorsBase {
/// Called if pattern support is disabled and a case constant's static type
diff --git a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer_operations.dart b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer_operations.dart
index 7ad61fc..4dcba8f 100644
--- a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer_operations.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_analyzer_operations.dart
@@ -10,8 +10,8 @@
/// client's representation of variables and types.
abstract interface class TypeAnalyzerOperations<
Variable extends Object,
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
InferableParameter extends Object,
TypeDeclarationType extends Object,
TypeDeclaration extends Object>
@@ -124,9 +124,6 @@
/// `false` for `Object?` and `Object*`.
bool isObject(Type type);
- /// Returns `true` if [type] is `R`, `R?`, or `R*` for some record type `R`.
- bool isRecordType(Type type);
-
/// Returns `true` if the type [type] satisfies the type schema [typeSchema].
bool isTypeSchemaSatisfied(
{required TypeSchema typeSchema, required Type type});
@@ -242,10 +239,6 @@
/// Computes the greatest lower bound of [typeSchema1] and [typeSchema2].
TypeSchema typeSchemaGlb(TypeSchema typeSchema1, TypeSchema typeSchema2);
- /// Determines whether the given type schema corresponds to the `dynamic`
- /// type.
- bool typeSchemaIsDynamic(TypeSchema typeSchema);
-
/// Returns `true` if the least closure of [leftSchema] is a subtype of
/// [rightType].
///
@@ -464,8 +457,8 @@
/// Abstract interface of a type constraint generator.
abstract class TypeConstraintGenerator<
Variable extends Object,
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
InferableParameter extends Object,
TypeDeclarationType extends Object,
TypeDeclaration extends Object,
diff --git a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_constraint.dart b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_constraint.dart
index 4a1c0e4..e77394e 100644
--- a/pkg/_fe_analyzer_shared/lib/src/type_inference/type_constraint.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/type_inference/type_constraint.dart
@@ -37,8 +37,8 @@
/// A constraint on a type parameter that we're inferring.
class MergedTypeConstraint<
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
TypeParameter extends Object,
Variable extends Object,
TypeDeclarationType extends Object,
@@ -173,8 +173,8 @@
/// readable error message during type inference as well as determining whether
/// the constraint was used to fix the type parameter or not.
abstract class TypeConstraintOrigin<
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
Variable extends Object,
TypeParameter extends Object,
TypeDeclarationType extends Object,
@@ -188,8 +188,8 @@
}
class UnknownTypeConstraintOrigin<
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
Variable extends Object,
InferableParameter extends Object,
TypeDeclarationType extends Object,
@@ -208,8 +208,8 @@
}
class TypeConstraintFromArgument<
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
Variable extends Object,
InferableParameter extends Object,
TypeDeclarationType extends Object,
@@ -258,8 +258,8 @@
}
class TypeConstraintFromExtendsClause<
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
Variable extends Object,
InferableParameter extends Object,
TypeDeclarationType extends Object,
@@ -301,8 +301,8 @@
}
class TypeConstraintFromFunctionContext<
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
Variable extends Object,
InferableParameter extends Object,
TypeDeclarationType extends Object,
@@ -329,8 +329,8 @@
}
class TypeConstraintFromReturnType<
- Type extends SharedType,
- TypeSchema extends Object,
+ Type extends SharedType<Type>,
+ TypeSchema extends SharedType<TypeSchema>,
Variable extends Object,
InferableParameter extends Object,
TypeDeclarationType extends Object,
diff --git a/pkg/_fe_analyzer_shared/lib/src/types/shared_type.dart b/pkg/_fe_analyzer_shared/lib/src/types/shared_type.dart
index 673eee0..4bd057a 100644
--- a/pkg/_fe_analyzer_shared/lib/src/types/shared_type.dart
+++ b/pkg/_fe_analyzer_shared/lib/src/types/shared_type.dart
@@ -6,26 +6,28 @@
/// Common interface for data structures used by the implementations to
/// represent the type `dynamic`.
-abstract interface class SharedDynamicType implements SharedType {}
+abstract interface class SharedDynamicType<Type extends SharedType<Type>>
+ implements SharedType<Type> {}
/// Common interface for data structures used by the implementations to
/// represent a type resulting from a compile-time error.
///
/// The implementations may choose to suppress further errors that arise from
/// the use of this type.
-abstract interface class SharedInvalidType implements SharedType {}
+abstract interface class SharedInvalidType<Type extends SharedType<Type>>
+ implements SharedType<Type> {}
/// Common interface for data structures used by the implementations to
/// represent a name/type pair.
-abstract interface class SharedNamedType<Type extends SharedType> {
+abstract interface class SharedNamedType<Type extends SharedType<Type>> {
String get name;
Type get type;
}
/// Common interface for data structures used by the implementations to
/// represent a record type.
-abstract interface class SharedRecordType<Type extends SharedType>
- implements SharedType {
+abstract interface class SharedRecordType<Type extends SharedType<Type>>
+ implements SharedType<Type> {
List<SharedNamedType<Type>> get namedTypes;
List<Type> get positionalTypes;
@@ -33,7 +35,7 @@
/// Common interface for data structures used by the implementations to
/// represent a type.
-abstract interface class SharedType {
+abstract interface class SharedType<Type extends SharedType<Type>> {
/// If this type ends in a suffix (`?` or `*`), the suffix it ends with;
/// otherwise [NullabilitySuffix.none].
NullabilitySuffix get nullabilitySuffix;
@@ -45,13 +47,15 @@
/// be changed if doing so would improve the UX.
String getDisplayString();
- bool isStructurallyEqualTo(SharedType other);
+ bool isStructurallyEqualTo(SharedType<Type> other);
}
/// Common interface for data structures used by the implementations to
/// represent the unknown type schema (`_`).
-abstract interface class SharedUnknownType implements SharedType {}
+abstract interface class SharedUnknownType<Type extends SharedType<Type>>
+ implements SharedType<Type> {}
/// Common interface for data structures used by the implementations to
/// represent the type `void`.
-abstract interface class SharedVoidType implements SharedType {}
+abstract interface class SharedVoidType<Type extends SharedType<Type>>
+ implements SharedType<Type> {}
diff --git a/pkg/_fe_analyzer_shared/test/mini_ast.dart b/pkg/_fe_analyzer_shared/test/mini_ast.dart
index 71f6dd1..4eec09d 100644
--- a/pkg/_fe_analyzer_shared/test/mini_ast.dart
+++ b/pkg/_fe_analyzer_shared/test/mini_ast.dart
@@ -2941,9 +2941,6 @@
property.isPromotable;
@override
- bool isRecordType(Type type) => type is RecordType;
-
- @override
bool isSubtypeOf(Type leftType, Type rightType) {
return _typeSystem.isSubtype(leftType, rightType);
}
@@ -3194,12 +3191,6 @@
TypeSchema.fromType(glb(typeSchema1.toType(), typeSchema2.toType()));
@override
- bool typeSchemaIsDynamic(TypeSchema typeSchema) {
- var type = typeSchema.toType();
- return type is DynamicType;
- }
-
- @override
bool typeSchemaIsSubtypeOfType(TypeSchema leftSchema, Type rightType) {
return isSubtypeOf(leftSchema.toType(), rightType);
}
diff --git a/pkg/_fe_analyzer_shared/test/mini_types.dart b/pkg/_fe_analyzer_shared/test/mini_types.dart
index 5a7ac29..204fa8e 100644
--- a/pkg/_fe_analyzer_shared/test/mini_types.dart
+++ b/pkg/_fe_analyzer_shared/test/mini_types.dart
@@ -15,7 +15,8 @@
/// Representation of the type `dynamic` suitable for unit testing of code in
/// the `_fe_analyzer_shared` package.
-class DynamicType extends _SpecialSimpleType implements SharedDynamicType {
+class DynamicType extends _SpecialSimpleType
+ implements SharedDynamicType<Type> {
static final instance = DynamicType._();
DynamicType._()
@@ -109,7 +110,8 @@
/// Representation of an invalid type suitable for unit testing of code in the
/// `_fe_analyzer_shared` package.
-class InvalidType extends _SpecialSimpleType implements SharedInvalidType {
+class InvalidType extends _SpecialSimpleType
+ implements SharedInvalidType<Type> {
static final instance = InvalidType._();
InvalidType._() : super._('error', nullabilitySuffix: NullabilitySuffix.none);
@@ -383,7 +385,7 @@
/// Representation of a type suitable for unit testing of code in the
/// `_fe_analyzer_shared` package.
-abstract class Type implements SharedType {
+abstract class Type implements SharedType<Type> {
@override
final NullabilitySuffix nullabilitySuffix;
@@ -459,7 +461,7 @@
String _toStringWithoutSuffix({required bool parenthesizeIfComplex});
}
-class TypeSchema {
+class TypeSchema implements SharedType<TypeSchema> {
final Type _type;
TypeSchema(String typeString) : _type = Type(typeString);
@@ -469,6 +471,25 @@
String get typeString => _type.type;
Type toType() => _type;
+
+ @override
+ String getDisplayString() {
+ throw UnsupportedError("TypeSchema.getDisplayString");
+ }
+
+ @override
+ bool isStructurallyEqualTo(SharedType<TypeSchema> other) {
+ throw UnsupportedError("TypeSchema.isStructurallyEqualTo");
+ }
+
+ @override
+ // TODO: implement nullabilitySuffix
+ NullabilitySuffix get nullabilitySuffix => throw UnimplementedError();
+}
+
+class DynamicTypeSchema extends TypeSchema
+ implements SharedDynamicType<TypeSchema> {
+ DynamicTypeSchema() : super.fromType(DynamicType.instance);
}
class TypeSystem {
@@ -948,7 +969,7 @@
/// Representation of the unknown type suitable for unit testing of code in the
/// `_fe_analyzer_shared` package.
-class UnknownType extends Type implements SharedUnknownType {
+class UnknownType extends Type implements SharedUnknownType<Type> {
const UnknownType({super.nullabilitySuffix = NullabilitySuffix.none})
: super._();
@@ -969,7 +990,7 @@
/// Representation of the type `void` suitable for unit testing of code in the
/// `_fe_analyzer_shared` package.
-class VoidType extends _SpecialSimpleType implements SharedVoidType {
+class VoidType extends _SpecialSimpleType implements SharedVoidType<Type> {
static final instance = VoidType._();
VoidType._() : super._('void', nullabilitySuffix: NullabilitySuffix.none);
diff --git a/pkg/analyzer/lib/dart/element/type.dart b/pkg/analyzer/lib/dart/element/type.dart
index 1640d33..9abc61b 100644
--- a/pkg/analyzer/lib/dart/element/type.dart
+++ b/pkg/analyzer/lib/dart/element/type.dart
@@ -30,7 +30,7 @@
/// The type associated with elements in the element model.
///
/// Clients may not extend, implement or mix-in this class.
-abstract class DartType implements SharedType {
+abstract class DartType implements SharedType<DartType> {
/// If this type is an instantiation of a type alias, information about
/// the alias element, and the type arguments.
/// Otherwise return `null`.
diff --git a/pkg/analyzer/lib/src/dart/element/type.dart b/pkg/analyzer/lib/src/dart/element/type.dart
index e345b3b..76f359b 100644
--- a/pkg/analyzer/lib/src/dart/element/type.dart
+++ b/pkg/analyzer/lib/src/dart/element/type.dart
@@ -32,7 +32,7 @@
/// The [Type] representing the type `dynamic`.
class DynamicTypeImpl extends TypeImpl
- implements DynamicType, SharedDynamicType {
+ implements DynamicType, SharedDynamicType<DartType> {
/// The unique instance of this class.
static final DynamicTypeImpl instance = DynamicTypeImpl._();
@@ -936,7 +936,7 @@
}
class InvalidTypeImpl extends TypeImpl
- implements InvalidType, SharedInvalidType {
+ implements InvalidType, SharedInvalidType<DartType> {
/// The unique instance of this class.
static final InvalidTypeImpl instance = InvalidTypeImpl._();
@@ -1549,7 +1549,8 @@
}
/// A concrete implementation of a [VoidType].
-class VoidTypeImpl extends TypeImpl implements VoidType, SharedVoidType {
+class VoidTypeImpl extends TypeImpl
+ implements VoidType, SharedVoidType<DartType> {
/// The unique instance of this class, with indeterminate nullability.
static final VoidTypeImpl instance = VoidTypeImpl._();
diff --git a/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart b/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart
index 7849463..88b4c83 100644
--- a/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_constraint_gatherer.dart
@@ -365,13 +365,12 @@
// constraints:
// If `P` is a record type or `Record`.
if (Q_nullability == NullabilitySuffix.none && Q.isDartCoreRecord) {
- if (_typeSystemOperations.isRecordType(P)) {
+ if (P is SharedRecordType<DartType>) {
return true;
}
}
- if (_typeSystemOperations.isRecordType(P) &&
- _typeSystemOperations.isRecordType(Q)) {
+ if (P is SharedRecordType<DartType> && Q is SharedRecordType<DartType>) {
return _recordType(P as RecordTypeImpl, Q as RecordTypeImpl, leftSchema,
nodeForTesting: nodeForTesting);
}
diff --git a/pkg/analyzer/lib/src/dart/element/type_schema.dart b/pkg/analyzer/lib/src/dart/element/type_schema.dart
index 1b0a898..711910c 100644
--- a/pkg/analyzer/lib/src/dart/element/type_schema.dart
+++ b/pkg/analyzer/lib/src/dart/element/type_schema.dart
@@ -18,7 +18,8 @@
/// parameters that we do not know yet. Notationally it is written `_`, for
/// example `List<_>`. This is distinct from `List<dynamic>`. These types will
/// never appear in the final resolved AST.
-class UnknownInferredType extends TypeImpl implements SharedUnknownType {
+class UnknownInferredType extends TypeImpl
+ implements SharedUnknownType<DartType> {
static const UnknownInferredType instance = UnknownInferredType._();
const UnknownInferredType._();
diff --git a/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart b/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
index f859694..16fd38d 100644
--- a/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
+++ b/pkg/analyzer/lib/src/dart/resolver/flow_analysis_visitor.dart
@@ -544,9 +544,6 @@
}
@override
- bool isRecordType(DartType type) => type is RecordType;
-
- @override
bool isSubtypeOf(DartType leftType, DartType rightType) {
return typeSystem.isSubtypeOf(leftType, rightType);
}
@@ -752,9 +749,6 @@
}
@override
- bool typeSchemaIsDynamic(DartType typeSchema) => typeSchema is DynamicType;
-
- @override
bool typeSchemaIsSubtypeOfType(DartType leftSchema, DartType rightType) {
return isSubtypeOf(leftSchema, rightType);
}
diff --git a/pkg/front_end/lib/src/type_inference/type_constraint_gatherer.dart b/pkg/front_end/lib/src/type_inference/type_constraint_gatherer.dart
index 0e6f830..a6a53c0 100644
--- a/pkg/front_end/lib/src/type_inference/type_constraint_gatherer.dart
+++ b/pkg/front_end/lib/src/type_inference/type_constraint_gatherer.dart
@@ -13,7 +13,7 @@
TypeDeclarationMatchResult,
Variance;
import 'package:_fe_analyzer_shared/src/types/shared_type.dart'
- show SharedDynamicType, SharedUnknownType, SharedVoidType;
+ show SharedDynamicType, SharedRecordType, SharedUnknownType, SharedVoidType;
import 'package:kernel/ast.dart';
import 'package:kernel/names.dart' show callName;
import 'package:kernel/type_algebra.dart';
@@ -951,8 +951,8 @@
// respect to `L` under constraints `C0 + ... + Cm`
// If for `i` in `0...m`, `Mi` is a subtype match for `Ni` with respect to
// `L` under constraints `Ci`.
- if (typeOperations.isRecordType(p) &&
- typeOperations.isRecordType(q) &&
+ if (p is SharedRecordType<DartType> &&
+ q is SharedRecordType<DartType> &&
(p as RecordType).positional.length ==
(q as RecordType).positional.length &&
p.named.length == q.named.length) {
diff --git a/pkg/front_end/lib/src/type_inference/type_inference_engine.dart b/pkg/front_end/lib/src/type_inference/type_inference_engine.dart
index 17420c0..b2f0942 100644
--- a/pkg/front_end/lib/src/type_inference/type_inference_engine.dart
+++ b/pkg/front_end/lib/src/type_inference/type_inference_engine.dart
@@ -577,9 +577,6 @@
}
@override
- bool isRecordType(DartType type) => type is RecordType;
-
- @override
PropertyNonPromotabilityReason? whyPropertyIsNotPromotable(
covariant Member property) {
FieldNonPromotabilityInfo? fieldNonPromotabilityInfo =
@@ -864,9 +861,6 @@
glb(typeSchema1, typeSchema2);
@override
- bool typeSchemaIsDynamic(DartType typeSchema) => typeSchema is DynamicType;
-
- @override
DartType typeToSchema(DartType type) => type;
@override
diff --git a/pkg/front_end/lib/src/type_inference/type_schema.dart b/pkg/front_end/lib/src/type_inference/type_schema.dart
index badca78..312efc1 100644
--- a/pkg/front_end/lib/src/type_inference/type_schema.dart
+++ b/pkg/front_end/lib/src/type_inference/type_schema.dart
@@ -49,7 +49,7 @@
///
/// The unknown type cannot appear in programs or in final inferred types: it is
/// purely part of the local inference process.
-class UnknownType extends AuxiliaryType implements SharedUnknownType {
+class UnknownType extends AuxiliaryType implements SharedUnknownType<DartType> {
const UnknownType();
@override
diff --git a/pkg/kernel/lib/ast.dart b/pkg/kernel/lib/ast.dart
index 70841a5..488528a 100644
--- a/pkg/kernel/lib/ast.dart
+++ b/pkg/kernel/lib/ast.dart
@@ -11021,7 +11021,7 @@
///
/// The `==` operator on [DartType]s compare based on type equality, not
/// object identity.
-sealed class DartType extends Node implements SharedType {
+sealed class DartType extends Node implements SharedType<DartType> {
const DartType();
@override
@@ -11188,7 +11188,7 @@
///
/// Can usually be treated as 'dynamic', but should occasionally be handled
/// differently, e.g. `x is ERROR` should evaluate to false.
-class InvalidType extends DartType implements SharedInvalidType {
+class InvalidType extends DartType implements SharedInvalidType<DartType> {
@override
final int hashCode = 12345;
@@ -11241,7 +11241,7 @@
}
}
-class DynamicType extends DartType implements SharedDynamicType {
+class DynamicType extends DartType implements SharedDynamicType<DartType> {
@override
final int hashCode = 54321;
@@ -11286,7 +11286,7 @@
}
}
-class VoidType extends DartType implements SharedVoidType {
+class VoidType extends DartType implements SharedVoidType<DartType> {
@override
final int hashCode = 123121;