mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 15:09:45 +00:00
[dart2js] Remove redundant check for Object when printing bounds.
Change-Id: I7e8190ac9d0095cf1bb225f94184eceba00ba887 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/145308 Reviewed-by: Stephen Adams <sra@google.com> Commit-Queue: Mayank Patke <fishythefish@google.com>
This commit is contained in:
parent
cde8098c97
commit
94c81a137b
|
@ -1664,8 +1664,7 @@ class _DartTypeToStringVisitor extends DartTypeVisitor<void, void> {
|
|||
needsComma = _comma(needsComma);
|
||||
_visit(typeVariable);
|
||||
DartType bound = typeVariable.bound;
|
||||
if (!bound._isTop(_useLegacySubtyping) &&
|
||||
(!_useLegacySubtyping || !bound.isObject)) {
|
||||
if (!bound._isTop(_useLegacySubtyping)) {
|
||||
_token(' extends ');
|
||||
_visit(bound);
|
||||
}
|
||||
|
|
|
@ -1156,8 +1156,7 @@ String _functionRtiToString(Rti functionType, List<String> genericContext,
|
|||
typeParametersText += typeSep;
|
||||
typeParametersText += genericContext[genericContext.length - 1 - i];
|
||||
Rti boundRti = _castToRti(_Utils.arrayAt(bounds, i));
|
||||
if (!isTopType(boundRti) &&
|
||||
(!JS_GET_FLAG('LEGACY') || !isObjectType(boundRti))) {
|
||||
if (!isTopType(boundRti)) {
|
||||
typeParametersText +=
|
||||
' extends ' + _rtiToString(boundRti, genericContext);
|
||||
}
|
||||
|
|
|
@ -1253,8 +1253,7 @@ String _functionRtiToString(Rti functionType, List<String>? genericContext,
|
|||
typeParametersText += typeSep;
|
||||
typeParametersText += genericContext[genericContext.length - 1 - i];
|
||||
Rti boundRti = _Utils.asRti(_Utils.arrayAt(bounds, i));
|
||||
if (!isTopType(boundRti) &&
|
||||
(!JS_GET_FLAG('LEGACY') || !isObjectType(boundRti))) {
|
||||
if (!isTopType(boundRti)) {
|
||||
typeParametersText +=
|
||||
' extends ' + _rtiToString(boundRti, genericContext);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue