mirror of
https://github.com/dart-lang/sdk
synced 2024-09-05 08:24:39 +00:00
Remove some unnecessary ignore comments in kernel
Change-Id: I6362107efe058c2a4465ff17e57edae18562e0fa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/274730 Commit-Queue: Brian Wilkerson <brianwilkerson@google.com> Reviewed-by: Johnni Winther <johnniwinther@google.com>
This commit is contained in:
parent
b9de2e1a72
commit
1e0091aae0
|
@ -306,9 +306,7 @@ abstract class ClassHierarchy
|
|||
Library? firstLibrary = firstName.library;
|
||||
Library? secondLibrary = secondName.library;
|
||||
if (firstLibrary != secondLibrary) {
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (firstLibrary == null) return -1;
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (secondLibrary == null) return 1;
|
||||
return firstLibrary.compareTo(secondLibrary);
|
||||
}
|
||||
|
|
|
@ -458,7 +458,6 @@ class AstPrinter {
|
|||
}
|
||||
_sb.write(')');
|
||||
Statement? body = node.body;
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (body != null) {
|
||||
if (body is ReturnStatement) {
|
||||
_sb.write(' => ');
|
||||
|
|
|
@ -101,7 +101,6 @@ String qualifiedClassNameToStringByReference(Reference? reference,
|
|||
includeLibraryName: includeLibraryName);
|
||||
} else {
|
||||
CanonicalName? canonicalName = reference.canonicalName;
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (canonicalName != null) {
|
||||
return qualifiedCanonicalNameToString(canonicalName,
|
||||
includeLibraryName: includeLibraryName);
|
||||
|
@ -137,7 +136,6 @@ String qualifiedExtensionNameToStringByReference(Reference? reference,
|
|||
includeLibraryName: includeLibraryName);
|
||||
} else {
|
||||
CanonicalName? canonicalName = reference.canonicalName;
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (canonicalName != null) {
|
||||
return qualifiedCanonicalNameToString(canonicalName,
|
||||
includeLibraryName: includeLibraryName);
|
||||
|
@ -172,7 +170,6 @@ String qualifiedViewNameToStringByReference(Reference? reference,
|
|||
includeLibraryName: includeLibraryName);
|
||||
} else {
|
||||
CanonicalName? canonicalName = reference.canonicalName;
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (canonicalName != null) {
|
||||
return qualifiedCanonicalNameToString(canonicalName,
|
||||
includeLibraryName: includeLibraryName);
|
||||
|
@ -208,7 +205,6 @@ String qualifiedTypedefNameToStringByReference(Reference? reference,
|
|||
includeLibraryName: includeLibraryName);
|
||||
} else {
|
||||
CanonicalName? canonicalName = reference.canonicalName;
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (canonicalName != null) {
|
||||
return qualifiedCanonicalNameToString(canonicalName,
|
||||
includeLibraryName: includeLibraryName);
|
||||
|
@ -249,7 +245,6 @@ String qualifiedMemberNameToStringByReference(Reference? reference,
|
|||
includeLibraryName: includeLibraryName);
|
||||
} else {
|
||||
CanonicalName? canonicalName = reference.canonicalName;
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (canonicalName != null) {
|
||||
return qualifiedCanonicalNameToString(canonicalName,
|
||||
includeLibraryName: includeLibraryName);
|
||||
|
|
|
@ -2866,7 +2866,6 @@ class Printer extends Visitor<void> with VisitorVoidMixin {
|
|||
writeWord(getTypeParameterName(node));
|
||||
writeSpaced('extends');
|
||||
writeType(node.bound);
|
||||
// ignore: unnecessary_null_comparison
|
||||
if (node.defaultType != node.bound) {
|
||||
writeSpaced('=');
|
||||
writeType(node.defaultType);
|
||||
|
|
|
@ -1671,7 +1671,6 @@ class Transformer extends TreeVisitor<TreeNode> {
|
|||
result != null,
|
||||
'Attempting to remove ${nodes[i]} (${nodes[i].runtimeType}) '
|
||||
'in transformer.');
|
||||
// ignore: invalid_null_aware_operator
|
||||
result.parent = parent;
|
||||
nodes[i] = result;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue