Skip to content

Commit

Permalink
Move nullabilitySuffix to the public interface for DartType.
Browse files Browse the repository at this point in the history
Change-Id: Idb53afaf30312b6423b84baa988ec2bb9ca29c24
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/125720
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Janice Collins <jcollins@google.com>
  • Loading branch information
jcollins-g authored and commit-bot@chromium.org committed Nov 20, 2019
1 parent 635aaa8 commit 733db09
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 4 additions & 0 deletions pkg/analyzer/lib/dart/element/type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
/// type parameters. But if we declare a variable as `Pair<String, int> pair;`
/// the references to `String` and `int` are type arguments.
import 'package:analyzer/dart/element/element.dart';
import 'package:analyzer/dart/element/nullability_suffix.dart';
import 'package:analyzer/src/dart/element/type.dart' show InterfaceTypeImpl;

/// The type associated with elements in the element model.
Expand Down Expand Up @@ -111,6 +112,9 @@ abstract class DartType {
/// such as when the type represents the type of an unnamed function.
String get name;

/// Return the nullability suffix of this type.
NullabilitySuffix get nullabilitySuffix;

/// If this type is a [TypeParameterType], returns its bound if it has one, or
/// [objectType] otherwise.
///
Expand Down
4 changes: 1 addition & 3 deletions pkg/analyzer/lib/src/dart/element/type.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2021,9 +2021,7 @@ abstract class TypeImpl implements DartType {
@override
bool get isVoid => false;

/**
* Return the nullability suffix of this type.
*/
@override
NullabilitySuffix get nullabilitySuffix;

/**
Expand Down

0 comments on commit 733db09

Please sign in to comment.