Chromium Code Reviews| Index: dart/pkg/compiler/lib/src/elements/modelx.dart |
| diff --git a/dart/pkg/compiler/lib/src/elements/modelx.dart b/dart/pkg/compiler/lib/src/elements/modelx.dart |
| index 007e58482e9c7fbdbee9805c16f1c56679984a8b..c5b24a3eb771c657e5fa0b91207a4f21b9cf8b2f 100644 |
| --- a/dart/pkg/compiler/lib/src/elements/modelx.dart |
| +++ b/dart/pkg/compiler/lib/src/elements/modelx.dart |
| @@ -12,21 +12,23 @@ import '../util/util.dart'; |
| import '../resolution/resolution.dart'; |
| import '../resolution/class_members.dart' show ClassMemberMixin; |
| -import '../dart2jslib.dart' show invariant, |
| - InterfaceType, |
| - DartType, |
| - TypeVariableType, |
| - TypedefType, |
| - DualKind, |
| - MessageKind, |
| - DiagnosticListener, |
| - Script, |
| - FunctionType, |
| - Selector, |
| - Constant, |
| - Compiler, |
| - Backend, |
| - isPrivateName; |
| +import '../dart2jslib.dart' show |
| + Backend, |
| + Compiler, |
| + CompilerCancelledException, |
| + Constant, |
| + DartType, |
| + DiagnosticListener, |
| + DualKind, |
| + FunctionType, |
| + InterfaceType, |
| + MessageKind, |
| + Script, |
| + Selector, |
| + TypeVariableType, |
| + TypedefType, |
| + invariant, |
| + isPrivateName; |
| import '../dart_types.dart'; |
| @@ -491,27 +493,29 @@ class ScopeX { |
| listener.reportError(accessor, |
| MessageKind.DUPLICATE_DEFINITION, |
| {'name': accessor.name}); |
| - // TODO(johnniwinther): Make this an info instead of a fatal error. |
| - listener.reportFatalError(other, |
| - MessageKind.EXISTING_DEFINITION, |
| - {'name': accessor.name}); |
| + listener.reportInfo( |
| + other, MessageKind.EXISTING_DEFINITION, {'name': accessor.name}); |
| + throw new CompilerCancelledException(null); |
|
Johnni Winther
2015/01/06 08:12:04
Add a TODO to let us continue the compilation.
ahe
2015/01/07 12:55:24
Done.
|
| } |
| if (existing != null) { |
| if (!identical(existing.kind, ElementKind.ABSTRACT_FIELD)) { |
| reportError(existing); |
| + return; |
| } else { |
| AbstractFieldElementX field = existing; |
| accessor.abstractField = field; |
| if (accessor.isGetter) { |
| if (field.getter != null && field.getter != accessor) { |
| reportError(field.getter); |
| + return; |
| } |
| field.getter = accessor; |
| } else { |
| assert(accessor.isSetter); |
| if (field.setter != null && field.setter != accessor) { |
| reportError(field.setter); |
| + return; |
| } |
| field.setter = accessor; |
| } |