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 = "Computer says no!"; | 7 const DONT_KNOW_HOW_TO_FIX = "Computer says no!"; |
| 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 1157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1168 static const MessageKind ASSIGNING_METHOD = const MessageKind( | 1168 static const MessageKind ASSIGNING_METHOD = const MessageKind( |
| 1169 "Cannot assign a value to a method."); | 1169 "Cannot assign a value to a method."); |
| 1170 | 1170 |
| 1171 static const MessageKind ASSIGNING_METHOD_IN_SUPER = const MessageKind( | 1171 static const MessageKind ASSIGNING_METHOD_IN_SUPER = const MessageKind( |
| 1172 "Cannot assign a value to method '#{name}' " | 1172 "Cannot assign a value to method '#{name}' " |
| 1173 "in superclass '#{superclassName}'."); | 1173 "in superclass '#{superclassName}'."); |
| 1174 | 1174 |
| 1175 static const MessageKind ASSIGNING_TYPE = const MessageKind( | 1175 static const MessageKind ASSIGNING_TYPE = const MessageKind( |
| 1176 "Cannot assign a value to a type."); | 1176 "Cannot assign a value to a type."); |
| 1177 | 1177 |
| 1178 static const MessageKind IF_NULL_ASSIGNING_TYPE = const MessageKind( | |
| 1179 "Cannot assign a value to a type. Note that types are never null, " | |
| 1180 "so this ??= assignment has no effect."); | |
|
Johnni Winther
2015/05/22 12:39:49
Maybe add a [howToFix] and an example. (We test th
Siggi Cherem (dart-lang)
2015/05/22 19:49:54
Done.
| |
| 1181 | |
| 1178 static const MessageKind VOID_NOT_ALLOWED = const MessageKind( | 1182 static const MessageKind VOID_NOT_ALLOWED = const MessageKind( |
| 1179 "Type 'void' can't be used here because it isn't a return type.", | 1183 "Type 'void' can't be used here because it isn't a return type.", |
| 1180 howToFix: "Try removing 'void' keyword or replace it with 'var', 'final'," | 1184 howToFix: "Try removing 'void' keyword or replace it with 'var', 'final'," |
| 1181 " or a type.", | 1185 " or a type.", |
| 1182 examples: const [ | 1186 examples: const [ |
| 1183 "void x; main() {}", | 1187 "void x; main() {}", |
| 1184 "foo(void x) {} main() { foo(null); }", | 1188 "foo(void x) {} main() { foo(null); }", |
| 1185 ]); | 1189 ]); |
| 1186 | 1190 |
| 1187 static const MessageKind NULL_NOT_ALLOWED = const MessageKind( | 1191 static const MessageKind NULL_NOT_ALLOWED = const MessageKind( |
| (...skipping 1368 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2556 static String convertToString(value) { | 2560 static String convertToString(value) { |
| 2557 if (value is ErrorToken) { | 2561 if (value is ErrorToken) { |
| 2558 // Shouldn't happen. | 2562 // Shouldn't happen. |
| 2559 return value.assertionMessage; | 2563 return value.assertionMessage; |
| 2560 } else if (value is Token) { | 2564 } else if (value is Token) { |
| 2561 value = value.value; | 2565 value = value.value; |
| 2562 } | 2566 } |
| 2563 return '$value'; | 2567 return '$value'; |
| 2564 } | 2568 } |
| 2565 } | 2569 } |
| OLD | NEW |