Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 973 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 984 C() { | 984 C() { |
| 985 return 1; | 985 return 1; |
| 986 } | 986 } |
| 987 } | 987 } |
| 988 | 988 |
| 989 main() => new C();"""]); | 989 main() => new C();"""]); |
| 990 | 990 |
| 991 static const MessageKind ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( | 991 static const MessageKind ILLEGAL_FINAL_METHOD_MODIFIER = const MessageKind( |
| 992 "Cannot have final modifier on method."); | 992 "Cannot have final modifier on method."); |
| 993 | 993 |
| 994 static const MessageKind ILLEGAL_CONST_FIELD_MODIFIER = const MessageKind( | |
| 995 "Cannot have const modifier on non-static field.", | |
| 996 howToFix: "Add a static modifier, or remove the const modifier.", | |
|
Johnni Winther
2014/06/25 07:21:03
'Add a ... or remove the ...' -> 'Try adding a ...
srawlins
2014/07/15 20:13:28
Done.
| |
| 997 examples: const [""" | |
| 998 class C { | |
| 999 const int a = 1; | |
| 1000 } | |
| 1001 | |
| 1002 main() => new C();"""]); | |
| 1003 | |
| 994 static const MessageKind ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( | 1004 static const MessageKind ILLEGAL_CONSTRUCTOR_MODIFIERS = const MessageKind( |
| 995 "Illegal constructor modifiers: '#{modifiers}'."); | 1005 "Illegal constructor modifiers: '#{modifiers}'."); |
| 996 | 1006 |
| 997 static const MessageKind ILLEGAL_MIXIN_APPLICATION_MODIFIERS = | 1007 static const MessageKind ILLEGAL_MIXIN_APPLICATION_MODIFIERS = |
| 998 const MessageKind( | 1008 const MessageKind( |
| 999 "Illegal mixin application modifiers: '#{modifiers}'."); | 1009 "Illegal mixin application modifiers: '#{modifiers}'."); |
| 1000 | 1010 |
| 1001 static const MessageKind ILLEGAL_MIXIN_SUPERCLASS = const MessageKind( | 1011 static const MessageKind ILLEGAL_MIXIN_SUPERCLASS = const MessageKind( |
| 1002 "Class used as mixin must have Object as superclass."); | 1012 "Class used as mixin must have Object as superclass."); |
| 1003 | 1013 |
| (...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2081 static String convertToString(value) { | 2091 static String convertToString(value) { |
| 2082 if (value is ErrorToken) { | 2092 if (value is ErrorToken) { |
| 2083 // Shouldn't happen. | 2093 // Shouldn't happen. |
| 2084 return value.assertionMessage; | 2094 return value.assertionMessage; |
| 2085 } else if (value is Token) { | 2095 } else if (value is Token) { |
| 2086 value = value.value; | 2096 value = value.value; |
| 2087 } | 2097 } |
| 2088 return '$value'; | 2098 return '$value'; |
| 2089 } | 2099 } |
| 2090 } | 2100 } |
| OLD | NEW |