| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 library dart2js.test.message_kind_helper; | 5 library dart2js.test.message_kind_helper; |
| 6 | 6 |
| 7 import 'package:expect/expect.dart'; | 7 import 'package:expect/expect.dart'; |
| 8 import 'dart:async'; | 8 import 'dart:async'; |
| 9 | 9 |
| 10 import 'package:compiler/src/commandline_options.dart'; | 10 import 'package:compiler/src/commandline_options.dart'; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 /// Add an exception here if a single diagnostic cannot be produced. | 26 /// Add an exception here if a single diagnostic cannot be produced. |
| 27 /// However, consider that a single concise diagnostic is easier to understand, | 27 /// However, consider that a single concise diagnostic is easier to understand, |
| 28 /// so try to change error reporting logic before adding an exception. | 28 /// so try to change error reporting logic before adding an exception. |
| 29 final Set<MessageKind> kindsWithExtraMessages = new Set<MessageKind>.from([ | 29 final Set<MessageKind> kindsWithExtraMessages = new Set<MessageKind>.from([ |
| 30 // If you add something here, please file a *new* bug report. | 30 // If you add something here, please file a *new* bug report. |
| 31 // See http://dartbug.com/18361: | 31 // See http://dartbug.com/18361: |
| 32 MessageKind.CANNOT_EXTEND_MALFORMED, | 32 MessageKind.CANNOT_EXTEND_MALFORMED, |
| 33 MessageKind.CANNOT_IMPLEMENT_MALFORMED, | 33 MessageKind.CANNOT_IMPLEMENT_MALFORMED, |
| 34 MessageKind.CANNOT_MIXIN, | 34 MessageKind.CANNOT_MIXIN, |
| 35 MessageKind.CANNOT_MIXIN_MALFORMED, | 35 MessageKind.CANNOT_MIXIN_MALFORMED, |
| 36 MessageKind.CANNOT_INSTANTIATE_ENUM, |
| 36 MessageKind.CYCLIC_TYPEDEF_ONE, | 37 MessageKind.CYCLIC_TYPEDEF_ONE, |
| 37 MessageKind.EQUAL_MAP_ENTRY_KEY, | 38 MessageKind.EQUAL_MAP_ENTRY_KEY, |
| 38 MessageKind.FINAL_FUNCTION_TYPE_PARAMETER, | 39 MessageKind.FINAL_FUNCTION_TYPE_PARAMETER, |
| 39 MessageKind.FORMAL_DECLARED_CONST, | 40 MessageKind.FORMAL_DECLARED_CONST, |
| 40 MessageKind.FORMAL_DECLARED_STATIC, | 41 MessageKind.FORMAL_DECLARED_STATIC, |
| 41 MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT, | 42 MessageKind.FUNCTION_TYPE_FORMAL_WITH_DEFAULT, |
| 42 MessageKind.HIDDEN_IMPLICIT_IMPORT, | 43 MessageKind.HIDDEN_IMPLICIT_IMPORT, |
| 43 MessageKind.HIDDEN_IMPORT, | 44 MessageKind.HIDDEN_IMPORT, |
| 44 MessageKind.INHERIT_GETTER_AND_METHOD, | 45 MessageKind.INHERIT_GETTER_AND_METHOD, |
| 45 MessageKind.UNIMPLEMENTED_METHOD, | 46 MessageKind.UNIMPLEMENTED_METHOD, |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 kindsWithPendingClasses.contains(template)); | 153 kindsWithPendingClasses.contains(template)); |
| 153 | 154 |
| 154 if (!pendingStuff) { | 155 if (!pendingStuff) { |
| 155 // If there is pending stuff, or the compiler was cancelled, we | 156 // If there is pending stuff, or the compiler was cancelled, we |
| 156 // shouldn't reuse the compiler. | 157 // shouldn't reuse the compiler. |
| 157 cachedCompiler = compiler; | 158 cachedCompiler = compiler; |
| 158 } | 159 } |
| 159 }); | 160 }); |
| 160 }).then((_) => cachedCompiler); | 161 }).then((_) => cachedCompiler); |
| 161 } | 162 } |
| OLD | NEW |