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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of dart2js; 5 part of dart2js;
6 6
7 const DONT_KNOW_HOW_TO_FIX = ""; 7 const DONT_KNOW_HOW_TO_FIX = "";
8 8
9 /** 9 /**
10 * The messages in this file should meet the following guide lines: 10 * The messages in this file should meet the following guide lines:
(...skipping 1342 matching lines...) Expand 10 before | Expand all | Expand 10 after
1353 const MessageKind( 1353 const MessageKind(
1354 "Error: '#{keyword}' is a reserved word and can't be used here.", 1354 "Error: '#{keyword}' is a reserved word and can't be used here.",
1355 howToFix: "Try using a different name.", 1355 howToFix: "Try using a different name.",
1356 examples: const ["do() {} main() {}"]); 1356 examples: const ["do() {} main() {}"]);
1357 1357
1358 static const MessageKind UNUSED_METHOD = const MessageKind( 1358 static const MessageKind UNUSED_METHOD = const MessageKind(
1359 "Hint: The method '#{method_name}' is never called.", 1359 "Hint: The method '#{method_name}' is never called.",
1360 howToFix: "Consider deleting it.", 1360 howToFix: "Consider deleting it.",
1361 examples: const ["deadCode() {} main() {}"]); 1361 examples: const ["deadCode() {} main() {}"]);
1362 1362
1363 static const MessageKind UNIMPLEMENTED_METHOD = const MessageKind(
1364 "Warning: '#{class_name}' doesn't implement '#{member_name}'.",
1365 howToFix: "Try adding an implementation of '#{member_name}'.",
1366 examples: const ["""
1367 abstract class I {
1368 m();
1369 }
1370
1371 class C implements I {}
1372
1373 main() => new C().m();
1374 """, """
1375 abstract class I {
1376 m();
1377 }
1378
1379 class C extends I {}
1380
1381 main() => new C().m();
Johnni Winther 2013/12/04 12:09:14 We should getter the warning without calling m.
ahe 2013/12/04 16:13:44 No, but we do get a warning that it is never calle
1382 """]);
1383
1363 static const MessageKind COMPILER_CRASHED = const MessageKind( 1384 static const MessageKind COMPILER_CRASHED = const MessageKind(
1364 "Error: The compiler crashed when compiling this element."); 1385 "Error: The compiler crashed when compiling this element.");
1365 1386
1366 static const MessageKind PLEASE_REPORT_THE_CRASH = const MessageKind(''' 1387 static const MessageKind PLEASE_REPORT_THE_CRASH = const MessageKind('''
1367 The compiler is broken. 1388 The compiler is broken.
1368 1389
1369 When compiling the above element, the compiler crashed. It is not 1390 When compiling the above element, the compiler crashed. It is not
1370 possible to tell if this is caused by a problem in your program or 1391 possible to tell if this is caused by a problem in your program or
1371 not. Regardless, the compiler should not crash. 1392 not. Regardless, the compiler should not crash.
1372 1393
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
1593 1614
1594 class CompileTimeConstantError extends Diagnostic { 1615 class CompileTimeConstantError extends Diagnostic {
1595 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse) 1616 CompileTimeConstantError(MessageKind kind, Map arguments, bool terse)
1596 : super(kind, arguments, terse); 1617 : super(kind, arguments, terse);
1597 } 1618 }
1598 1619
1599 class CompilationError extends Diagnostic { 1620 class CompilationError extends Diagnostic {
1600 CompilationError(MessageKind kind, Map arguments, bool terse) 1621 CompilationError(MessageKind kind, Map arguments, bool terse)
1601 : super(kind, arguments, terse); 1622 : super(kind, arguments, terse);
1602 } 1623 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698