Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(590)

Unified Diff: pkg/analyzer/lib/src/generated/error_verifier.dart

Issue 2246293002: remove duplicate checking for overrides (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/strong_mode_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/generated/error_verifier.dart
diff --git a/pkg/analyzer/lib/src/generated/error_verifier.dart b/pkg/analyzer/lib/src/generated/error_verifier.dart
index a9f2f6cab01ff22a98e0df4d11b092febf20afe6..4e2de26ef741e7e097642f627009fe7a94ade766 100644
--- a/pkg/analyzer/lib/src/generated/error_verifier.dart
+++ b/pkg/analyzer/lib/src/generated/error_verifier.dart
@@ -1439,6 +1439,10 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
List<ParameterElement> parameters,
List<AstNode> parameterLocations,
SimpleIdentifier errorNameTarget) {
+ if (_options.strongMode) {
+ return false; // strong mode already checked for this
+ }
+
bool isGetter = false;
bool isSetter = false;
if (derivedElement is PropertyAccessorElement) {
@@ -1778,6 +1782,7 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
List<ParameterElement> parameters,
List<AstNode> parameterLocations,
SimpleIdentifier errorNameTarget) {
+ assert(!_options.strongMode); // strong mode already checked for these
//
// Compute the overridden executable from the InheritanceManager
//
@@ -1802,6 +1807,10 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
*/
void _checkForAllInvalidOverrideErrorCodesForField(
FieldDeclaration declaration) {
+ if (_options.strongMode) {
+ return; // strong mode already checked for this
+ }
+
if (_enclosingClass == null || declaration.isStatic) {
return;
}
@@ -1833,6 +1842,9 @@ class ErrorVerifier extends RecursiveAstVisitor<Object> {
*/
void _checkForAllInvalidOverrideErrorCodesForMethod(
MethodDeclaration method) {
+ if (_options.strongMode) {
+ return; // strong mode already checked for this
+ }
if (_enclosingClass == null ||
method.isStatic ||
method.body is NativeFunctionBody) {
« no previous file with comments | « no previous file | pkg/analyzer/test/generated/strong_mode_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698