Update comments to refer to the greatest/least closure operation.
Fixes #36129.
Bug: 36129
Change-Id: I29f1182d7071d66d7d9fb6e43b4cb544d52bd344
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/96141
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
diff --git a/pkg/analyzer/lib/src/generated/type_system.dart b/pkg/analyzer/lib/src/generated/type_system.dart
index 30b2925..6e978a6 100644
--- a/pkg/analyzer/lib/src/generated/type_system.dart
+++ b/pkg/analyzer/lib/src/generated/type_system.dart
@@ -577,6 +577,9 @@
///
/// In practice this will always replace `?` with either bottom or top
/// (dynamic), depending on the position of `?`.
+ ///
+ /// This implements the operation the spec calls "least closure", or
+ /// sometimes "least closure with respect to `?`".
DartType lowerBoundForType(DartType type) {
return _substituteForUnknownType(type, lowerBound: true);
}
@@ -641,6 +644,9 @@
///
/// In practice this will always replace `?` with either bottom or top
/// (dynamic), depending on the position of `?`.
+ ///
+ /// This implements the operation the spec calls "greatest closure", or
+ /// sometimes "greatest closure with respect to `?`".
DartType upperBoundForType(DartType type) {
return _substituteForUnknownType(type);
}