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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 18029018: Check that non-abstract classes implement all methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Address comments Created 7 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
Index: dart/sdk/lib/_internal/compiler/implementation/warnings.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/warnings.dart b/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
index dc92997d8578b51858a56a47171f6261cc4903c2..2d711c3e41fa5d35aa6b911e43d6648e935944eb 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/warnings.dart
@@ -1360,6 +1360,41 @@ main() {}
howToFix: "Consider deleting it.",
examples: const ["deadCode() {} main() {}"]);
+ static const MessageKind UNIMPLEMENTED_METHOD = const MessageKind(
+ "Warning: '#{class_name}' doesn't implement '#{member_name}'.",
+ howToFix: "Try adding an implementation of '#{member_name}'.",
+ examples: const ["""
+abstract class I {
+ m();
+}
+
+class C implements I {}
+
+class D implements I {
+ m() {}
+}
+
+main() {
+ new D().m();
+ new C();
+}
+""", """
+abstract class I {
+ m();
+}
+
+class C extends I {}
+
+class D extends I {
+ m() {}
+}
+
+main() {
+ new D().m();
+ new C();
+}
+"""]);
+
static const MessageKind COMPILER_CRASHED = const MessageKind(
"Error: The compiler crashed when compiling this element.");

Powered by Google App Engine
This is Rietveld 408576698