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

Unified Diff: pkg/analyzer/lib/src/task/strong/info.dart

Issue 1430953004: Check field overrides (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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
Index: pkg/analyzer/lib/src/task/strong/info.dart
diff --git a/pkg/analyzer/lib/src/task/strong/info.dart b/pkg/analyzer/lib/src/task/strong/info.dart
index 1aa42b2dfd377339e6124e25a37eabbb7b76f223..9d4812f8b9839edc61a1dea5da4431605cf954dc 100644
--- a/pkg/analyzer/lib/src/task/strong/info.dart
+++ b/pkg/analyzer/lib/src/task/strong/info.dart
@@ -452,6 +452,15 @@ class InvalidMethodOverride extends InvalidOverride {
String get message => _messageHelper('Invalid override');
}
+class InvalidFieldOverride extends InvalidOverride {
+ InvalidFieldOverride(AstNode node, ExecutableElement element,
+ InterfaceType base, DartType subType, DartType baseType)
+ : super(node, element, base, subType, baseType);
+
+ String get message => 'Field declaration {3}.{1} cannot be '
+ 'overridden in {0}.';
+}
+
/// Dart constructors have one weird quirk, illustrated with this example:
///
/// class Base {

Powered by Google App Engine
This is Rietveld 408576698