Skip to content

Commit

Permalink
[vm] Restore InstanceKind.TypeRef in the VM-service API for backwards…
Browse files Browse the repository at this point in the history
… compatibility

TEST=doc/comment change
Change-Id: I0fcb9d418a9c95e6ce57a03eb693aefb9e245d2a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/301501
Reviewed-by: Ben Konyi <[email protected]>
Commit-Queue: Alexander Markov <[email protected]>
  • Loading branch information
alexmarkov authored and Commit Queue committed May 4, 2023
1 parent eecd301 commit c1f9930
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
27 changes: 13 additions & 14 deletions pkg/vm_service/lib/src/vm_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2960,7 +2960,8 @@ class InstanceKind {
/// An instance of the Dart class TypeParameter.
static const String kTypeParameter = 'TypeParameter';

/// An instance of the Dart class TypeRef.
/// An instance of the Dart class TypeRef. Note: this object kind is
/// deprecated and will be removed.
static const String kTypeRef = 'TypeRef';

/// An instance of the Dart class FunctionType.
Expand Down Expand Up @@ -4637,8 +4638,8 @@ class FieldRef extends ObjRef {

/// The declared type of this field.
///
/// The value will always be of one of the kinds: Type, TypeRef,
/// TypeParameter, BoundedType.
/// The value will always be of one of the kinds: Type, TypeParameter,
/// RecordType, FunctionType, BoundedType.
InstanceRef? declaredType;

/// Is this field const?
Expand Down Expand Up @@ -4732,8 +4733,8 @@ class Field extends Obj implements FieldRef {

/// The declared type of this field.
///
/// The value will always be of one of the kinds: Type, TypeRef,
/// TypeParameter, BoundedType.
/// The value will always be of one of the kinds: Type, TypeParameter,
/// RecordType, FunctionType, BoundedType.
@override
InstanceRef? declaredType;

Expand Down Expand Up @@ -5747,22 +5748,20 @@ class Instance extends Obj implements InstanceRef {
@optional
int? parameterIndex;

/// The type bounded by a BoundedType instance - or - the referent of a
/// TypeRef instance.
/// The type bounded by a BoundedType instance.
///
/// The value will always be of one of the kinds: Type, TypeRef,
/// TypeParameter, BoundedType.
/// The value will always be of one of the kinds: Type, TypeParameter,
/// RecordType, FunctionType, BoundedType.
///
/// Provided for instance kinds:
/// - BoundedType
/// - TypeRef
@optional
InstanceRef? targetType;

/// The bound of a TypeParameter or BoundedType.
///
/// The value will always be of one of the kinds: Type, TypeRef,
/// TypeParameter, BoundedType.
/// The value will always be of one of the kinds: Type, TypeParameter,
/// RecordType, FunctionType, BoundedType.
///
/// Provided for instance kinds:
/// - BoundedType
Expand Down Expand Up @@ -8666,8 +8665,8 @@ class TypeArguments extends Obj implements TypeArgumentsRef {

/// A list of types.
///
/// The value will always be one of the kinds: Type, TypeRef, TypeParameter,
/// BoundedType.
/// The value will always be one of the kinds: Type, TypeParameter,
/// RecordType, FunctionType, BoundedType.
List<InstanceRef>? types;

TypeArguments({
Expand Down
4 changes: 4 additions & 0 deletions runtime/vm/service/service.md
Original file line number Diff line number Diff line change
Expand Up @@ -3330,6 +3330,10 @@ enum InstanceKind {
// An instance of the Dart class TypeParameter.
TypeParameter,
// An instance of the Dart class TypeRef.
// Note: this object kind is deprecated and will be removed.
TypeRef,
// An instance of the Dart class FunctionType.
FunctionType,
Expand Down

0 comments on commit c1f9930

Please sign in to comment.