| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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.resolution.members; | 5 library dart2js.resolution.members; |
| 6 | 6 |
| 7 import '../common.dart'; | 7 import '../common.dart'; |
| 8 import '../common/names.dart' show | 8 import '../common/names.dart' show |
| 9 Selectors; | 9 Selectors; |
| 10 import '../compiler.dart' show | 10 import '../compiler.dart' show |
| (...skipping 3740 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3751 reporter.reportErrorMessage( | 3751 reporter.reportErrorMessage( |
| 3752 modifierNode, MessageKind.EXTRANEOUS_MODIFIER, | 3752 modifierNode, MessageKind.EXTRANEOUS_MODIFIER, |
| 3753 {'modifier': modifier}); | 3753 {'modifier': modifier}); |
| 3754 } | 3754 } |
| 3755 if (modifiers.isFinal && (modifiers.isConst || modifiers.isVar)) { | 3755 if (modifiers.isFinal && (modifiers.isConst || modifiers.isVar)) { |
| 3756 reportExtraModifier('final'); | 3756 reportExtraModifier('final'); |
| 3757 } | 3757 } |
| 3758 if (modifiers.isVar && (modifiers.isConst || node.type != null)) { | 3758 if (modifiers.isVar && (modifiers.isConst || node.type != null)) { |
| 3759 reportExtraModifier('var'); | 3759 reportExtraModifier('var'); |
| 3760 } | 3760 } |
| 3761 if (enclosingElement.isFunction) { | 3761 if (enclosingElement.isFunction || enclosingElement.isConstructor) { |
| 3762 if (modifiers.isAbstract) { | 3762 if (modifiers.isAbstract) { |
| 3763 reportExtraModifier('abstract'); | 3763 reportExtraModifier('abstract'); |
| 3764 } | 3764 } |
| 3765 if (modifiers.isStatic) { | 3765 if (modifiers.isStatic) { |
| 3766 reportExtraModifier('static'); | 3766 reportExtraModifier('static'); |
| 3767 } | 3767 } |
| 3768 } | 3768 } |
| 3769 if (node.metadata != null) { | 3769 if (node.metadata != null) { |
| 3770 variables.metadataInternal = | 3770 variables.metadataInternal = |
| 3771 compiler.resolver.resolveMetadata(enclosingElement, node); | 3771 compiler.resolver.resolveMetadata(enclosingElement, node); |
| (...skipping 910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4682 } | 4682 } |
| 4683 return const NoneResult(); | 4683 return const NoneResult(); |
| 4684 } | 4684 } |
| 4685 } | 4685 } |
| 4686 | 4686 |
| 4687 /// Looks up [name] in [scope] and unwraps the result. | 4687 /// Looks up [name] in [scope] and unwraps the result. |
| 4688 Element lookupInScope(DiagnosticReporter reporter, Node node, | 4688 Element lookupInScope(DiagnosticReporter reporter, Node node, |
| 4689 Scope scope, String name) { | 4689 Scope scope, String name) { |
| 4690 return Elements.unwrap(scope.lookup(name), reporter, node); | 4690 return Elements.unwrap(scope.lookup(name), reporter, node); |
| 4691 } | 4691 } |
| OLD | NEW |