| 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: "Try adding a static modifier, or removing the const modifier.", |
| 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 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2113 static String convertToString(value) { | 2123 static String convertToString(value) { |
| 2114 if (value is ErrorToken) { | 2124 if (value is ErrorToken) { |
| 2115 // Shouldn't happen. | 2125 // Shouldn't happen. |
| 2116 return value.assertionMessage; | 2126 return value.assertionMessage; |
| 2117 } else if (value is Token) { | 2127 } else if (value is Token) { |
| 2118 value = value.value; | 2128 value = value.value; |
| 2119 } | 2129 } |
| 2120 return '$value'; | 2130 return '$value'; |
| 2121 } | 2131 } |
| 2122 } | 2132 } |
| OLD | NEW |