Skip to content

Commit 8c316a9

Browse files
committed
Remove unnecessary null checks.
[email protected] Change-Id: Ic88659225aeff8dba8b4050938da704c23583b38 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/155700 Reviewed-by: Brian Wilkerson <[email protected]>
1 parent 6c9b885 commit 8c316a9

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

pkg/analyzer/lib/src/generated/error_verifier.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4364,9 +4364,7 @@ class ErrorVerifier extends RecursiveAstVisitor<void> {
43644364
CompileTimeErrorCode.INITIALIZING_FORMAL_FOR_STATIC_FIELD,
43654365
parameter,
43664366
[parameter.identifier.name]);
4367-
} else if (declaredType != null &&
4368-
fieldType != null &&
4369-
!_typeSystem.isSubtypeOf(declaredType, fieldType)) {
4367+
} else if (!_typeSystem.isSubtypeOf(declaredType, fieldType)) {
43704368
_errorReporter.reportErrorForNode(
43714369
StaticWarningCode.FIELD_INITIALIZING_FORMAL_NOT_ASSIGNABLE,
43724370
parameter,

0 commit comments

Comments
 (0)