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

Unified Diff: pkg/compiler/lib/src/resolution/resolution.dart

Issue 1508343002: Static/instance getter/setter override is a warning. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Update analyzer status + include unsaved identical => == change Created 5 years 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 | tests/language/language_analyzer.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/resolution/resolution.dart
diff --git a/pkg/compiler/lib/src/resolution/resolution.dart b/pkg/compiler/lib/src/resolution/resolution.dart
index 4490b8870d37d0a1b1dfdcd02c7bbfc100145ce7..6c4f90b232c6adb126da9a4910fc1e7a5a8b5bb2 100644
--- a/pkg/compiler/lib/src/resolution/resolution.dart
+++ b/pkg/compiler/lib/src/resolution/resolution.dart
@@ -856,7 +856,7 @@ class ResolverTask extends CompilerTask {
if (lookupElement == null) {
reporter.internalError(member,
"No abstract field for accessor");
- } else if (!identical(lookupElement.kind, ElementKind.ABSTRACT_FIELD)) {
+ } else if (!lookupElement.isAbstractField) {
if (lookupElement.isMalformed || lookupElement.isAmbiguous) return;
reporter.internalError(member,
"Inaccessible abstract field for accessor");
@@ -869,14 +869,14 @@ class ResolverTask extends CompilerTask {
if (setter == null) return;
int getterFlags = getter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
int setterFlags = setter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
- if (!identical(getterFlags, setterFlags)) {
+ if (getterFlags != setterFlags) {
final mismatchedFlags =
new Modifiers.withFlags(null, getterFlags ^ setterFlags);
- reporter.reportErrorMessage(
+ reporter.reportWarningMessage(
field.getter,
MessageKind.GETTER_MISMATCH,
{'modifiers': mismatchedFlags});
- reporter.reportErrorMessage(
+ reporter.reportWarningMessage(
field.setter,
MessageKind.SETTER_MISMATCH,
{'modifiers': mismatchedFlags});
« no previous file with comments | « no previous file | tests/language/language_analyzer.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698