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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/warnings.dart

Issue 179293005: Check that const-map keys don't override equals. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 9 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 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 538 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 549
550 static const MessageKind NOT_A_COMPILE_TIME_CONSTANT = const MessageKind( 550 static const MessageKind NOT_A_COMPILE_TIME_CONSTANT = const MessageKind(
551 "Not a compile-time constant."); 551 "Not a compile-time constant.");
552 552
553 static const MessageKind CYCLIC_COMPILE_TIME_CONSTANTS = const MessageKind( 553 static const MessageKind CYCLIC_COMPILE_TIME_CONSTANTS = const MessageKind(
554 "Cycle in the compile-time constant computation."); 554 "Cycle in the compile-time constant computation.");
555 555
556 static const MessageKind CONSTRUCTOR_IS_NOT_CONST = const MessageKind( 556 static const MessageKind CONSTRUCTOR_IS_NOT_CONST = const MessageKind(
557 "Constructor is not a 'const' constructor."); 557 "Constructor is not a 'const' constructor.");
558 558
559 static const MessageKind KEY_NOT_A_STRING_LITERAL = const MessageKind( 559 static const MessageKind CONST_MAP_KEY_OVERRIDES_EQUALS =
560 "Map-literal key not a string literal."); 560 const MessageKind(
561 "Const-map key type '#{type}' overrides 'operator =='.");
561 562
562 static const MessageKind NO_SUCH_LIBRARY_MEMBER = const MessageKind( 563 static const MessageKind NO_SUCH_LIBRARY_MEMBER = const MessageKind(
563 "'#{libraryName}' has no member named '#{memberName}'."); 564 "'#{libraryName}' has no member named '#{memberName}'.");
564 565
565 static const MessageKind CANNOT_INSTANTIATE_TYPEDEF = const MessageKind( 566 static const MessageKind CANNOT_INSTANTIATE_TYPEDEF = const MessageKind(
566 "Cannot instantiate typedef '#{typedefName}'."); 567 "Cannot instantiate typedef '#{typedefName}'.");
567 568
568 static const MessageKind REQUIRED_PARAMETER_WITH_DEFAULT = const MessageKind( 569 static const MessageKind REQUIRED_PARAMETER_WITH_DEFAULT = const MessageKind(
569 "Non-optional parameters can't have a default value.", 570 "Non-optional parameters can't have a default value.",
570 howToFix: 571 howToFix:
(...skipping 1319 matching lines...) Expand 10 before | Expand all | Expand 10 after
1890 return computeMessage(); 1891 return computeMessage();
1891 } 1892 }
1892 1893
1893 bool operator==(other) { 1894 bool operator==(other) {
1894 if (other is !Message) return false; 1895 if (other is !Message) return false;
1895 return (kind == other.kind) && (toString() == other.toString()); 1896 return (kind == other.kind) && (toString() == other.toString());
1896 } 1897 }
1897 1898
1898 int get hashCode => throw new UnsupportedError('Message.hashCode'); 1899 int get hashCode => throw new UnsupportedError('Message.hashCode');
1899 } 1900 }
OLDNEW
« no previous file with comments | « sdk/lib/_internal/compiler/implementation/resolution/members.dart ('k') | tests/co19/co19-dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698