Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Side by Side Diff: dart/pkg/compiler/lib/src/resolution/members.dart

Issue 841303002: Non fatal errors on duplicated accessors (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r42766. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 part of resolution; 5 part of resolution;
6 6
7 abstract class TreeElements { 7 abstract class TreeElements {
8 AnalyzableElement get analyzedElement; 8 AnalyzableElement get analyzedElement;
9 Iterable<Node> get superUses; 9 Iterable<Node> get superUses;
10 10
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1112 // field once, so we just ignore setters. 1112 // field once, so we just ignore setters.
1113 if (!member.isGetter) return; 1113 if (!member.isGetter) return;
1114 1114
1115 // Find the associated abstract field. 1115 // Find the associated abstract field.
1116 ClassElement classElement = member.enclosingClass; 1116 ClassElement classElement = member.enclosingClass;
1117 Element lookupElement = classElement.lookupLocalMember(member.name); 1117 Element lookupElement = classElement.lookupLocalMember(member.name);
1118 if (lookupElement == null) { 1118 if (lookupElement == null) {
1119 compiler.internalError(member, 1119 compiler.internalError(member,
1120 "No abstract field for accessor"); 1120 "No abstract field for accessor");
1121 } else if (!identical(lookupElement.kind, ElementKind.ABSTRACT_FIELD)) { 1121 } else if (!identical(lookupElement.kind, ElementKind.ABSTRACT_FIELD)) {
1122 if (lookupElement.isErroneous || lookupElement.isAmbiguous) return;
1122 compiler.internalError(member, 1123 compiler.internalError(member,
1123 "Inaccessible abstract field for accessor"); 1124 "Inaccessible abstract field for accessor");
1124 } 1125 }
1125 AbstractFieldElement field = lookupElement; 1126 AbstractFieldElement field = lookupElement;
1126 1127
1127 FunctionElementX getter = field.getter; 1128 FunctionElementX getter = field.getter;
1128 if (getter == null) return; 1129 if (getter == null) return;
1129 FunctionElementX setter = field.setter; 1130 FunctionElementX setter = field.setter;
1130 if (setter == null) return; 1131 if (setter == null) return;
1131 int getterFlags = getter.modifiers.flags | Modifiers.FLAG_ABSTRACT; 1132 int getterFlags = getter.modifiers.flags | Modifiers.FLAG_ABSTRACT;
(...skipping 3882 matching lines...) Expand 10 before | Expand all | Expand 10 after
5014 } 5015 }
5015 5016
5016 /// The result for the resolution of the `assert` method. 5017 /// The result for the resolution of the `assert` method.
5017 class AssertResult implements ResolutionResult { 5018 class AssertResult implements ResolutionResult {
5018 const AssertResult(); 5019 const AssertResult();
5019 5020
5020 Element get element => null; 5021 Element get element => null;
5021 5022
5022 String toString() => 'AssertResult()'; 5023 String toString() => 'AssertResult()';
5023 } 5024 }
OLDNEW
« no previous file with comments | « dart/pkg/compiler/lib/src/resolution/class_members.dart ('k') | dart/pkg/compiler/lib/src/warnings.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698