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

Side by Side Diff: lib/compiler/implementation/patch_parser.dart

Issue 10824350: Fix some type warnings. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 4 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 #library("patchparser"); 5 #library("patchparser");
6 #import("dart:uri"); 6 #import("dart:uri");
7 7
8 #import("tree/tree.dart", prefix: "tree"); 8 #import("tree/tree.dart", prefix: "tree");
9 #import("leg.dart", prefix: 'leg'); // CompilerTask, Compiler. 9 #import("leg.dart", prefix: 'leg'); // CompilerTask, Compiler.
10 #import("apiimpl.dart"); 10 #import("apiimpl.dart");
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 if (isMemberPatch) { 204 if (isMemberPatch) {
205 if (element is! FunctionElement) { 205 if (element is! FunctionElement) {
206 listener.internalErrorOnElement(element, 206 listener.internalErrorOnElement(element,
207 "Member patch is not a function."); 207 "Member patch is not a function.");
208 } 208 }
209 if (existing.kind === ElementKind.ABSTRACT_FIELD) { 209 if (existing.kind === ElementKind.ABSTRACT_FIELD) {
210 if (!element.isAccessor()) { 210 if (!element.isAccessor()) {
211 listener.internalErrorOnElement( 211 listener.internalErrorOnElement(
212 element, "Patching non-accessor with accessor"); 212 element, "Patching non-accessor with accessor");
213 } 213 }
214 AbstractField field = existing; 214 AbstractFieldElement field = existing;
ahe 2012/08/20 15:23:16 Anders already fixed this, I think.
215 if (element.isGetter()) { 215 if (element.isGetter()) {
216 existing = field.getter; 216 existing = field.getter;
217 } else { 217 } else {
218 existing = field.setter; 218 existing = field.setter;
219 } 219 }
220 } 220 }
221 if (existing is! FunctionElement) { 221 if (existing is! FunctionElement) {
222 listener.internalErrorOnElement(element, 222 listener.internalErrorOnElement(element,
223 "No corresponding method for patch."); 223 "No corresponding method for patch.");
224 } 224 }
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 274 }
275 } 275 }
276 276
277 void addMember(Element element) { 277 void addMember(Element element) {
278 if (isMemberPatch || (isClassPatch && element is ClassElement)) { 278 if (isMemberPatch || (isClassPatch && element is ClassElement)) {
279 element.addMetadata(popNode()); 279 element.addMetadata(popNode());
280 } 280 }
281 super.addMember(element); 281 super.addMember(element);
282 } 282 }
283 } 283 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698